Skip to content

Docs: README doesn't coincide with what is in the example code (pages/_app.js) #39555

@thebuddysystem

Description

@thebuddysystem

What is the improvement or update you wish to see?

I would like to see the documentation in the README be consistent with what's in the code.

In the next.js/examples/with-redux-thunk README.md, it states:

... The MyApp component is wrapped in a withReduxStore function ...

However, in the code at pages/_app.js there is no MyApp component nor is there a withReduxStore function, so it's really confusing. I'm guessing that got replaced with the hook in _app.js called useStore??

Additionally, it states:
1.) pages/index.js will utilize connect from react-redux ...
which seems wrong, because there's no call to any connect function in the actual code.

Also the last sentence states:
... then in store.js change (line 19) store.replaceReducer(createNextReducer(initialState)) to store.replaceReducer(createNextReducer).
that also seems wrong because i can't find store.replaceReducer anywhere.

Is there any context that might help us understand?

Just read the README and try to follow along in the code.

Does the docs page already exist? Please link to it.

https://github.com/vercel/next.js/tree/canary/examples/with-redux-thunk/README.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    examplesIssue was opened via the examples template.good first issueEasy to fix issues, good for newcomers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions