You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 6, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,16 +36,14 @@ with a focus on
36
36
37
37
---
38
38
39
-
The official [Create React App](https://github.com/facebook/create-react-app) template of [React Boilerplate](https://github.com/react-boilerplate/react-boilerplate)
39
+
The official [Create React App](https://github.com/facebook/create-react-app) template of the `discontinued`[React Boilerplate](https://github.com/react-boilerplate/react-boilerplate)
@@ -56,6 +54,8 @@ Start your `create-react-app` projects in seconds with the best, industry-standa
56
54
57
55
## Install & Start
58
56
57
+
⚠️ Using [Yarn Package Manager](https://yarnpkg.com) is recommended over `npm`.
58
+
59
59
Create React App with the template
60
60
61
61
```shell
@@ -72,11 +72,17 @@ yarn start
72
72
Remove the example app to start your project!
73
73
74
74
```shell
75
-
yarn run cleanAndSetup
75
+
yarn cleanAndSetup
76
76
```
77
77
78
+
---
79
+
78
80
## Features
79
81
82
+
> This project is **NOT** a framework, UI component library or a design system. The only purpose of this template is to assist you starting your CRA app with a solid tool stack and development patterns. It's 100% customizable. After you start your journey and once you understand the concepts offered here you should personalize your code accordingly instead of being tied to the starter project.
83
+
>
84
+
> You can add or remove literally anything and use whichever library or tools you prefer.
85
+
80
86
<dl>
81
87
82
88
<dt>Predictable state management</dt>
@@ -115,7 +121,7 @@ But wait... there's more!
115
121
-_Stay fast_: Profile your app's performance from the comfort of your command
Copy file name to clipboardExpand all lines: docs/building-blocks/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,8 @@ It is one of the most important files of the boilerplate. It contains all the gl
10
10
11
11
-`react-app-polyfill` is imported to enable compatibility with many browsers and cool stuff like generator functions, Promises, etc.
12
12
- A Redux `store` is instantiated.
13
-
-`ReactDOM.render()` not only renders the [root React component](https://github.com/react-boilerplate/react-boilerplate/blob/master/app/containers/App/index.js), called `<App />`, of your application, but it renders it with `<Provider />`.
14
-
- Hot module replacement via [Webpack HMR](https://webpack.js.org/guides/hot-module-replacement/) makes the i18n translations hot reloadable.
13
+
-`ReactDOM.render()` not only renders the [root React component](https://github.com/react-boilerplate/react-boilerplate-cra-template/blob/master/src/app/index.tsx), called `<App />`, of your application, but it renders it with `<Provider />`.
14
+
- Hot module replacement via [Webpack HMR](https://webpack.js.org/guides/hot-module-replacement/) makes the i18n translations hot re-loadable.
15
15
- i18next internationalization support setup.
16
16
-`<Provider />` connects your app with the Redux `store`.
17
17
@@ -79,7 +79,7 @@ Imagine that your application is fetching data in JSON format from a back-end. F
79
79
2.`API_SUCCESS`: Upon dispatching this, your application should show the data to the user.
80
80
3.`API_FAILURE`: Upon dispatching this, your application should show an error message to the user.
81
81
82
-
And this is only for **_one_** API call. In a real-world scenario, one page of your application could be making tens of API calls. How do we manage all of them effectively? It essentially boils down to controlling the flow of your application. What if there was a background process that handled multiple actions simultaneously and communicated with the Redux store and React containers at the same time? Here is where `redux-saga` enters the picture.
82
+
And this is only for **_one_** API call. In a real-world scenario, one page of your application could be making tens of API calls. How do we manage all of them effectively? It essentially boils down to controlling the flow of your application. What if there was a background process that handled multiple actions simultaneously and communicated with the Redux store and React components at the same time? Here is where `redux-saga` enters the picture.
83
83
84
84
For a mental model, consider a saga like a separate thread in your application that's solely responsible for side-effects. Then `redux-saga` is a Redux middleware, which means this thread can be started, paused, and canceled from the main application with standard Redux actions. It has access to the full Redux application state, and it can dispatch Redux actions as well.
Copy file name to clipboardExpand all lines: docs/building-blocks/async-components.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Async Components
2
2
3
-
To load a component asynchronously, create a `Loadable` file by hand or via component/container generators with the 'Do you want to load resources asynchronously?' option activated.
3
+
To load a component asynchronously, create a `Loadable` file by hand or via component generator with the 'Do you want to load resources asynchronously?' option activated.
Copy file name to clipboardExpand all lines: docs/building-blocks/routing.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ To add a new route, simply import the `Route` component and use it standalone or
16
16
17
17
Top level routes are located in `src/app/index.tsx`.
18
18
19
-
If you want your route component (or any component for that matter) to be loaded asynchronously, use the container or component generator with 'Do you want to load resources asynchronously?' option activated.
19
+
If you want your route component (or any component for that matter) to be loaded asynchronously, use the component generator with 'Do you want to load resources asynchronously?' option activated.
If you have read the redux-toolkit documentation you are familiar with the `slice` concept now. Here, we are taking it another step further by enriching it with `reselect` and `redux-saga`.
4
+
5
+
Slice manages, encapsulates, and operates a `portion` of your application's data. For example, if you have a page that displays a user list, then you can have a slice called 'UsersPageSlice' that contains all the users in its state, also the functions to read it from the store and the functions to update the users in the list. So, in short, a slice is a redux-toolkit slice also containing the relative `reselect` and `redux-saga` operations within its folder. After all, they are all related to managing the same portion of the data.
6
+
7
+
A `slice` is independent of the UI component. It can contain any kind of logic and it can be located in any folder. To follow the `folder-by-feature` pattern it is recommended to keep your `slices` closer to your component using it. But, this doesn't mean that it only belongs to that component. You can import and use that slice in whichever component you want.
8
+
9
+
The next steps in the documentation describes how to use the slices with some examples.
10
+
11
+
Example folder view:
12
+
13
+
```
14
+
project
15
+
|
16
+
├── app
17
+
│ └── src
18
+
│ ├── app
19
+
│ │ ├── Homepage
20
+
│ │ │ ├── index.tsx
21
+
│ │ │ ├── slice => Contains the relevant stuff for Homepage data
0 commit comments