Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provider: pass state (S) generic through to ProviderProps #1960

Merged
merged 3 commits into from
Nov 4, 2022

Commits on Oct 6, 2022

  1. Provider: pass state (S) generic through to ProviderProps

    This is necessary to catch mistakes such as this, where the type of `serverState` does not match the type of the state in the provided `store`.
    
    ```tsx
    import { Provider } from 'react-redux';
    import { Store } from 'redux';
    
    declare const store: Store<{ foo: string }>;
    <Provider store={store} serverState={"oops"}>foo</Provider>
    ```
    OliverJAsh authored Oct 6, 2022
    Configuration menu
    Copy the full SHA
    b50f392 View commit details
    Browse the repository at this point in the history
  2. Add type test

    OliverJAsh committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    e7017ed View commit details
    Browse the repository at this point in the history
  3. any -> unknown

    OliverJAsh committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    9e09869 View commit details
    Browse the repository at this point in the history