-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Add redux toolkit example with Typescript #23052
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My personal opinion: there's barely any TypeScript code here to make it different from the other example. Should we just stick with that one which was just merged?
Hey, I think that there should be a separate example with typescript because it has types like |
@Mokshit06 Let’s instead add that small bit to the readme of the other example then? A short typescript section with that code snippet. There’s been a couple instances where we had duplicate examples and one was updated and the other wasn’t, so if the code isn’t that different for typescript, I try to avoid it. |
@leerob Since the file structure of this example is identical to the one in the redux toolkit template, should we just link the official documentation on setting up redux toolkit and react-redux with typescript in the readme? It lists all the steps in great detail and works with the Next.js setup. |
Yep I like that idea 👍 |
Does this look good? Typescript Setup
|
@leerob Should I create a new Pull Request with these changes or should I add them in this one and delete the typescript example? |
Let's just make a new PR. Thank you so much! 🙏 |
This is the typescript version of the other Pull Request (#23047) which I created in which I had simplified the redux toolkit example.
The code structure is identical to the official redux typescript template