Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Commit f4ac26d

Browse files
authored
chore: 🔧 releasing 1.2.0
2 parents 734b67f + b1e9d69 commit f4ac26d

File tree

150 files changed

+1003
-1336
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+1003
-1336
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: build
33
on:
44
- push
55
- pull_request
6+
- workflow_dispatch
67

78
jobs:
89
createNpmPackage:

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ name: release
22

33
on:
44
release:
5-
types:
6-
- created
5+
types:
6+
- created
7+
workflow_dispatch:
78

89
jobs:
910
createAndTestCRAFromNpm:
1011
strategy:
1112
matrix:
12-
node-version: [12.x, 14.x]
13+
node-version: [12.x, 14.x, 15.x]
1314

1415
runs-on: ubuntu-latest
1516
steps:

.github/workflows/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: test
22
on:
33
- push
44
- pull_request
5+
- workflow_dispatch
56

67
jobs:
78
test:

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,14 @@ with a focus on
3636

3737
---
3838

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)
4040
![](https://img.shields.io/github/stars/react-boilerplate/react-boilerplate?style=flat)
4141

4242
Start your `create-react-app` projects in seconds with the best, industry-standard tools and practices made ready for you.
4343

44-
**📚Documentation:** [Gitbook](https://cansahin.gitbook.io/react-boilerplate-cra-template/)
44+
**📚 Documentation:** [Gitbook](https://cansahin.gitbook.io/react-boilerplate-cra-template/)
4545

46-
**🎨 Check the example app:** [Boilerplate Example Application](https://react-boilerplate.github.io/react-boilerplate-cra-template/)
47-
48-
**🚑 Collection of `'HOW TO'`s:** [Examples & Tutorials for common patterns](https://github.com/react-boilerplate/cra-template-examples)
46+
**🎨 Check the example app:** [Demonstrating the features](https://react-boilerplate.github.io/react-boilerplate-cra-template/)
4947

5048
**📦 Package:** [npm](https://www.npmjs.com/package/cra-template-rb)
5149

@@ -56,6 +54,8 @@ Start your `create-react-app` projects in seconds with the best, industry-standa
5654

5755
## Install & Start
5856

57+
⚠️ Using [Yarn Package Manager](https://yarnpkg.com) is recommended over `npm`.
58+
5959
Create React App with the template
6060

6161
```shell
@@ -72,11 +72,17 @@ yarn start
7272
Remove the example app to start your project!
7373

7474
```shell
75-
yarn run cleanAndSetup
75+
yarn cleanAndSetup
7676
```
7777

78+
---
79+
7880
## Features
7981

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+
8086
<dl>
8187

8288
<dt>Predictable state management</dt>
@@ -115,7 +121,7 @@ But wait... there's more!
115121
- _Stay fast_: Profile your app's performance from the comfort of your command
116122
line!
117123

118-
<sub><i>Keywords: Create React App, React Boilerplate, Custom Template, Typescript, React.js, Redux, Hot Reloading, ESNext, Babel, react-router, Offline First, ServiceWorker, `styled-components`, redux-saga, FontFaceObserver</i></sub>
124+
<sub><i>Keywords: Create React App, React Boilerplate, Custom Template, Typescript, React.js, Redux, Hot Reloading, ESNext, Babel, react-router, `styled-components`, redux-saga, FontFaceObserver</i></sub>
119125

120126
## Contributors
121127

docs/SUMMARY.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
## Building Blocks
1212

1313
- [Building Blocks](building-blocks/README.md)
14-
- [Redux & Toolkit](building-blocks/redux-toolkit.md)
15-
- [Reselect](building-blocks/reselect.md)
16-
- [Redux-Saga](building-blocks/redux-saga.md)
17-
- [Redux Injectors](building-blocks/redux-injectors.md)
14+
- [The `Slice`](building-blocks/slice/README.md)
15+
- [Redux & Toolkit](building-blocks/slice/redux-toolkit.md)
16+
- [Reselect](building-blocks/slice/reselect.md)
17+
- [Redux-Saga](building-blocks/slice/redux-saga.md)
18+
- [Redux Injectors](building-blocks/slice/redux-injectors.md)
1819
- [Async Components](building-blocks/async-components.md)
1920
- [Routing](building-blocks/routing.md)
2021
- [i18n Internationalization & Pluralization](building-blocks/i18n.md)

docs/building-blocks/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ It is one of the most important files of the boilerplate. It contains all the gl
1010

1111
- `react-app-polyfill` is imported to enable compatibility with many browsers and cool stuff like generator functions, Promises, etc.
1212
- 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.
1515
- i18next internationalization support setup.
1616
- `<Provider />` connects your app with the Redux `store`.
1717

@@ -79,7 +79,7 @@ Imagine that your application is fetching data in JSON format from a back-end. F
7979
2. `API_SUCCESS`: Upon dispatching this, your application should show the data to the user.
8080
3. `API_FAILURE`: Upon dispatching this, your application should show an error message to the user.
8181

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.
8383

8484
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.
8585

docs/building-blocks/async-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Async Components
22

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.
44

55
This is the content of the file by default:
66

docs/building-blocks/i18n.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ import { translations } from 'locales/translations';
7373
import { _t } from 'utils/messages';
7474

7575
export const messages = {
76-
someItem: _t(translations.HomePage.Features.someItem, 'default value'),
76+
someItem: () => _t(translations.HomePage.Features.someItem, 'default value'),
7777
// ...
7878
};
7979
```
@@ -87,7 +87,7 @@ import { messages } from './messages';
8787

8888
export function MyComponent() {
8989
const { t } = useTranslation();
90-
return <div>{t(...messages.someItem}</div>;
90+
return <div>{t(...messages.someItem()}</div>;
9191
}
9292
```
9393

docs/building-blocks/routing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ To add a new route, simply import the `Route` component and use it standalone or
1616

1717
Top level routes are located in `src/app/index.tsx`.
1818

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.
2020

2121
## Child Routes
2222

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# What is a Slice?
2+
3+
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
22+
│ │ │ │ ├── index.ts
23+
│ │ │ │ ├── saga.ts
24+
│ │ │ │ ├── selectors.ts
25+
│ │ │ │ └── types.ts
26+
```

0 commit comments

Comments
 (0)