List
Simple list that can be hooked into React.
Source code is hosted on GitHub
Seamless React integration is shipped in a separate package:
useListThere is a version of this package that syncs directly to the localStorage
:
createList()
Creates a new instance of observable list:
Create a new instance without the factory function:
Create a new instance with a custom differ:
List.get()
Retrieve everything from the list:
List.getAt()
Retrieve a value at the specific index:
List.set()
Replace everything in the list:
List.add()
Append some new values to the list:
List.addAt()
Add a value at the specific index:
List.has()
Check if a specific value is in the list:
List.hasAt()
Check if there is a value at the specific index:
List.remove()
Remove a value from the list:
List.removeAt()
Remove value at the specific index:
List.indexOf()
Get index of a specific value:
List.filter()
Filter values in the list:
List.map()
Map values in the list:
List.forEach()
Iterate over values in the list:
List.listen()
Listen to changes:
Invoke listener immediately:
Listen with a custom differ:
List.use()
Convenience method for people used to React's useState
syntax:
Last updated