cra-template-toolkit-saga-starter
v1.0.1
Published
Multi-lang & theme added to React Along with an optimized redux approach
Downloads
4
Maintainers
Readme
Installation
To install the template, simply run
// npm
npx create-react-app new-app --template toolkit-saga-starter
// yarn
yarn create react-app new-app --template toolkit-saga-starter
You will then see a preview of the template running at localehost:3000
. That's it.
This is a create-react-app
template featuring themes, multi-language, redux
apis, etc. We just combine two powerful tools for redux (saga & toolkit) to have a fantastic experiense with state management and SoC (Separation of concern).
Let's dive into it!
Get Started 🚀
Usage & Features
Here is just part of benefits that this template provides you! (ignoring the fact that it can be used to create a full scaled applications without any issues)
- Fantastic approach in implementing redux
- Themes
- Multi language
File Generation
Genrate a container with just a simple command (consider container as a new page in your app)
simply run:
yarn generate container
you will be asked a series of questions in the terminal, like the name of your new page and so on...
then a completely new page with a auto generated redux file is presented to you in your app/containers
like so:
src
│
└── app
└── containers
├── NEWLY CREATED CONTAINER (PAGE)
Hooks
Use any slice anywhere in your app, simply by
use_CONTAINERNAME_Slice()
for example if we wanna use home slice
useHomeSlice()
and now whe can get all the data we want from that slice.
important note: You must add a slice using its hooks to the component if it is not in context of that container.
Contribute
Contributions are always welcome. Contact me!
YAYA 💞