redux-easy-mode
redux-templates
redux-easy-mode | redux-templates | |
---|---|---|
1 | 10 | |
0 | 1,352 | |
- | 2.1% | |
5.3 | 9.2 | |
5 months ago | 26 days ago | |
TypeScript | TypeScript | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
redux-easy-mode
-
The new wave of React state management
Have you considered something like "selector based side effects"? https://github.com/mikew/redux-easy-mode#selector-based-side.... The difference is most side effects are based around when an action is dispatched, but I wanted to know when things _change_.
It's possible to do the same thing with a react component + useEffect, but I thought a pure-redux solution would better fit the spirit of Redux.
redux-templates
-
The new wave of React state management
Yeah, _please_ don't use `typesafe-actions` :)
It may have had some value before RTK came out, but a lot of the opinions and approaches shown in its docs lead you to write _wayyyy_ too much code. For example, we specifically recommend _against_ writing TS unions for action object types [0].
RTK completely obsoletes `typesafe-actions`, and the TS usage patterns that we teach today should result in a pretty minimal set of types that you need to write in your own code.
For a small example see the RTK+TS template for Create-React-App [1]. If you want to see what a real app codebase can look like, the client app for my day job at Replay.io is OSS [2]. It's admittedly a somewhat messy codebase due to its long evolution and legacy (started as the FF DevTools codebase, copy-pasted, and we've been slowly migrating to RTK+TS and modernizing it), but files like [3] show how I would write a real slice reducer with RTK+TS.
[0] https://redux.js.org/usage/usage-with-typescript#avoid-actio...
[1] https://github.com/reduxjs/cra-template-redux-typescript
[2] https://github.com/replayio/devtools
[3] https://github.com/replayio/devtools/blob/454804188d33900a26...
-
How I Setup Redux Toolkit and RTK Query
The recommended way to initialize a new app with React and Redux is by using the official Redux+JS template or Redux+TS template.
-
Should i learn Typescript prior to React?
I learned the basics of react initially, and then when I started using typescript + react, I did so using the create-react-app typescript redux template. I found that having a template to build from was extremely helpful. I'm sure there are other good templates out there if you didn't want to worry about redux (I think it's good, but it's got it's own mental overhead), but being able to refer to the template implementation was extremely helpful, since the typings of some react things can be highly weird.
- Best place and way to learn about Redux
- Correctly typin Store interface with redux toolkit
- Folder structure for React-Redux with Typescript project
-
React-Redux-Typescript Boilerplate
Please see the official Redux+TS template for CRA, which shows the correct "modern Redux" patterns in action, as well as the "Modern Redux with RTK" tutorial page and our recommended TS usage patterns.
-
Hello, I am recording again. This time about the latest version Redux and TypeScript.
btw, note that we have an official Redux+TS template for CRA that comes with RTK and React-Redux already configured.
- Mastering Typescript State Management using Redux
-
DO Hackathon: Web Application
Now the first two questions have been answered. Moving on to the next one, state management. I decided to use redux. Came across this amazing toolkit and this beautiful and friendly template template from the official reduxjs repository.
What are some alternatives?
redux-eggs - Add some Eggs to your Redux store.
redux-xstate-poc - Manage your Redux side effects with XState. Use 100% of XState's features.
vuex - 🗃️ Centralized State Management for Vue.js.
grug-dev-translation - The Grug Brained Developer - Plain English Translation
inertia - Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.
devtools - Replay.io DevTools
alt - Isomorphic flux implementation
redux-toolkit - The official, opinionated, batteries-included toolset for efficient Redux development
Dn-FamiTra