What are features of presentational/dumb components?
What are features of presentational/dumb components?
Presentational or dumb components in React Native are primarily focused on rendering the user interface (UI). Here are the key features of presentational/dumb components:
UI-Focused: Presentational components are mainly concerned with how things look. They render markup and styles based on the props they receive, without dictating how the data is loaded or manipulated.
Stateless: These components are typically stateless, meaning they do not manage their own state. If they do have state, it is only for UI-level concerns, such as toggling a dropdown menu or managing an input field value, rather than handling application data.
Props Driven: Presentational components receive all the data they need via props. This makes them predictable and easier to test, as their output is fully determined by the props they receive.
Đăng nhập để tham gia thảo luận cùng mọi người.
Chưa có bình luận nào
Hãy là người đầu tiên chia sẻ suy nghĩ của bạn.