re_reselect 0.2.2

Dart native js
Flutter Android iOS web

Re-reselect is a lightweight wrapper around Reselect meant to enhance selectors with deeper memoization and cache management.

Re-reselect for Dart #

A Selector library for Dart, based on the original Re-reselect JavaScript library.

Motivation #

re-reselect is a lightweight wrapper around Reselect meant to enhance selectors with deeper memoization and cache management.

Switching between different arguments using standard reselect selectors causes cache invalidation since default reselect cache has a limit of one.

re-reselect forwards different calls to different reselect selectors stored in cache, so that computed/memoized values are retained.

re-reselect selectors work as normal reselect selectors but they are able to determine when creating a new selector or querying a cached one on the fly, depending on the supplied arguments.

Useful to:

  • Retain selector's cache when sequentially called with one/few different arguments
  • Join similar selectors into one
  • Share selectors with props across multiple component instances
  • Instantiate selectors on runtime
  • Enhance reselect with custom caching strategies

See example and tests for details.

2
likes
100
pub points
43%
popularity

Re-reselect is a lightweight wrapper around Reselect meant to enhance selectors with deeper memoization and cache management.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploaders

roman.abdulmanov@team.wrike.com
igor.demyanov@team.wrike.com

License

MIT (LICENSE)

Dependencies

reselect

More

Packages that depend on re_reselect