Skip to content

Commit 4c471b0

Browse files
authored
Update Docusaurus to 2.0-beta.1 (#1735)
1 parent 7de6008 commit 4c471b0

File tree

4 files changed

+1056
-1055
lines changed

4 files changed

+1056
-1055
lines changed

docs/introduction/why-use-react-redux.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@ If you are using Redux with any kind of UI framework, you will normally use a "U
1818

1919
To understand why you should use React Redux, it may help to understand what a "UI binding library" does.
2020

21-
> **Note**: If you have questions about whether you should use Redux in general, please see these articles for discussion of when and why you might want to use Redux, and how it's intended to be used:
22-
>
23-
> - [Redux docs: Motivation](https://redux.js.org/introduction/motivation)
24-
> - [Redux docs: FAQ - When should I use Redux?](https://redux.js.org/faq/general#when-should-i-use-redux)
25-
> - [You Might Not Need Redux](https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367)
26-
> - [Idiomatic Redux: The Tao of Redux, Part 1 - Implementation and Intent](https://blog.isquaredsoftware.com/2017/05/idiomatic-redux-tao-of-redux-part-1/)
21+
:::info
22+
23+
If you have questions about whether you should use Redux in general, please see these articles for discussion of when and why you might want to use Redux, and how it's intended to be used:
24+
25+
- [Redux docs: Motivation](https://redux.js.org/introduction/motivation)
26+
- [Redux docs: FAQ - When should I use Redux?](https://redux.js.org/faq/general#when-should-i-use-redux)
27+
- [You Might Not Need Redux](https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367)
28+
- [Idiomatic Redux: The Tao of Redux, Part 1 - Implementation and Intent](https://blog.isquaredsoftware.com/2017/05/idiomatic-redux-tao-of-redux-part-1/)
29+
30+
:::
2731

2832
## Integrating Redux with a UI
2933

@@ -42,25 +46,19 @@ While it is possible to write this logic by hand, doing so would become very rep
4246

4347
The process of subscribing to the store, checking for updated data, and triggering a re-render can be made more generic and reusable. **A UI binding library like React Redux handles the store interaction logic, so you don't have to write that code yourself.**
4448

45-
> **Note**: For a deeper look at how React Redux works internally and how it handles the store interaction for you, see **[Idiomatic Redux: The History and Implementation of React Redux](https://blog.isquaredsoftware.com/2018/11/react-redux-history-implementation/)**.
49+
:::info
50+
51+
For a deeper look at how React Redux works internally and how it handles the store interaction for you, see **[Idiomatic Redux: The History and Implementation of React Redux](https://blog.isquaredsoftware.com/2018/11/react-redux-history-implementation/)**.
52+
53+
:::
4654

4755
## Reasons to Use React Redux
4856

4957
### It is the Official Redux UI Bindings for React
5058

5159
While Redux can be used with any UI layer, it was originally designed and intended for use with React. There are [UI binding layers for many other frameworks](https://redux.js.org/introduction/ecosystem#library-integration-and-bindings), but React Redux is maintained directly by the Redux team.
5260

53-
As the offical Redux binding for React, React Redux is kept up-to-date with any API changes from either library, to ensure that your React components behave as expected. Its intended usage adopts the design principles of React - writing declarative components.
54-
55-
### It Encourages Good React Architecture
56-
57-
React components are a lot like functions. While it's possible to write all your code in a single function, it's usually better to split that logic into smaller functions that each handle a specific task, making them easier to understand.
58-
59-
Similarly, while you can write large React components that handle many different tasks, it's usually better to split up components based on responsibilities. In particular, it is common to have "container" components that are responsible for collecting and managing some kind of data, and "presentational" components that simply display UI based on whatever data they've received as props.
60-
61-
**The React Redux `connect` function generates "container" wrapper components that handle the process of interacting with the store for you**. That way, your own components can focus on other tasks, whether it be collecting other data, or just displaying a piece of the UI. In addition, **`connect` abstracts away the question of _which_ store is being used, making your own components more reusable**.
62-
63-
As a general architectural principle, **we want to keep our own components "unaware" of Redux**. They should simply receive data and functions as props, just like any other React component. This ultimately makes it easier to test and reuse your own components.
61+
As the official Redux binding for React, React Redux is kept up-to-date with any API changes from either library, to ensure that your React components behave as expected. Its intended usage adopts the design principles of React - writing declarative components.
6462

6563
### It Implements Performance Optimizations For You
6664

netlify.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
[plugins.inputs]
1111
paths = [
1212
"node_modules/.cache",
13+
"website/node_modules/.cache"
1314
]
1415

0 commit comments

Comments
 (0)