re_reselect 1.0.0 copy "re_reselect: ^1.0.0" to clipboard
re_reselect: ^1.0.0 copied to clipboard

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
130
pub points
31%
popularity

Publisher

verified publisherwrike.com

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

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (LICENSE)

Dependencies

reselect

More

Packages that depend on re_reselect