useList

React state hook that tracks an array and provides methods to modify it.

hooks
Description of the SVG image Loading...

About

To cause component re-render you have to use these methods instead of direct interaction with array - it won't cause re-render.

We can ensure that actions object and actions itself will not mutate or change between renders, so there is no need to add it to useEffect dependencies and safe to pass them down to children.

Note: remove action is deprecated and actually is a copy of removeAt action. Within closest updates it will gain different functionality.

Installation

Run the following command:

npx ever-ui-clx@0.2.1 add demo-use-list
# └──> Hook coming soon.

Usage