Docs: Add simpler Basic Usage example for createListener Middleware (suggestion)#4836
Open
kostasx wants to merge 1 commit intoreduxjs:masterfrom
Open
Docs: Add simpler Basic Usage example for createListener Middleware (suggestion)#4836kostasx wants to merge 1 commit intoreduxjs:masterfrom
kostasx wants to merge 1 commit intoreduxjs:masterfrom
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 17c73e4:
|
✅ Deploy Preview for redux-starter-kit-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Collaborator
|
Is your concern around the setup part ( |
Contributor
Author
|
Mostly the effect callback contents. The setup part, is mandatory for a basic example, I guess. |
Contributor
Author
|
For a basic example, I think, all the things inside the callback are a bit too much. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I find the
Basic Usageexample way too convoluted and definitely not Basic. I suggest this is split into a very simple version for setting up and dispatching an action (I tried to keep it as simple as possible) and an extended version with some of the other options available.I've also included another listener on the extended version.
P.S. Up to the team and the community to decide, but I find myself in trouble whenever I need to reach out for a very basic setup in order to implement a listener in my code.