In this project I introduce a pattern inspired by Nir Kaufman's book - Thinking in Redux
In this practice the application business logic is being driven by Redux as an exportable package that can be imported from any UI implementation.
In this repo there are four different implementations which all use the same Redux driven business logic to fetch data and update the state.
- Split Redux folder from your UI folder - to be able to replace your framework easily.
- Reducers are pure functions which have no logic
- Actions creators are pure functions which have no logic
- All the logic should be placed in Redux middlewares
- Features can only change their feature-state.
- All features can read the complete app state and use it
- Actions Types are in a single file
The app is pretty simple, created just to introduce this pattern, it basically uses TvMaze API to search and present data about TV shows
Don't be lazy, run it!
Should be run once, from the root folder (this is a yarn-workspaces monorepo)
yarn install
yarn react
Runs the app in the development mode React implementation.
Open http://localhost:4444 to view it in the browser.
yarn vue
Runs the app in the development mode VueJS implementation.
Open http://localhost:5555 to view it in the browser.
yarn angular
Runs the app in the development mode Angular implementation.
Open http://localhost:4200 to view it in the browser.
yarn slimjs
Runs the app in the development mode SlimJS implementation.
Open http://localhost:9000 to view it in the browser.