Component
is part of the React API.
(Component
是React API的一部分。)
A Component is a class or function that describes part of a React UI.(组件是描述React UI的一部分的类或函数。)
Container is an informal term for a React component that is connect
-ed to a redux store.
(容器是connect
到Redux存储的React组件的非正式术语。)
Containers receive Redux state updates and dispatch
actions, and they usually don't render DOM elements;(容器接收Redux状态更新和dispatch
动作,并且它们通常不呈现DOM元素。)
they delegate rendering to presentational child components.(他们将渲染委托给演示性子组件。)
For more detail read presentational vs container components by Dan Abramov.
(有关更多详细信息,请阅读Dan Abramov的presentational vs container组件 。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…