Comments (4)
Hi @ianobermiller,
currently the string|number
limitation is imposed at the core level of the library.
Therefore custom cacheObject
instances can only receive cache keys of type number or string.
Updating the library to let in any kind of cache key value is technically feasible but it's something I'd like to consider very carefully.
Do you have any significative use case for it?
Cheers!
from re-reselect.
Ping @ianobermiller. 😄
I came up with a possible solution to move the string/number restriction from the library to the cache implementation. Here is the work in progress PR #37.
I still cannot think of a real use case for it, but it's probably just me. BTW, happy to receive any feedback.
Cheers!
from re-reselect.
Hey! Sorry for that, not sure how I missed your original response! The use case was that we have an expensive computation that it done on an object in the redux store, and we want the entire object itself to be the key because there is no other identifier. Our case was something like transforming a JSON representation of rich text into the JSX needed to render it (or just from one format used for storage to another used for rendering).
from re-reselect.
Shipped with v2.0.0!
from re-reselect.
Related Issues (20)
- type inference on createStructuredCachedSelector? HOT 2
- Documentation request HOT 5
- Component with in re-sizable is not getting displayed HOT 2
- Dropped support for createCachedSelector calls with multiple arguments? HOT 3
- Dependency Dashboard
- `unexpected argument error` type error when `createStructuredCachedSelector` provided with 2+ arguments HOT 3
- Action Required: Fix Renovate Configuration
- Return default cache key selector when not defined HOT 1
- selectorCreator typing issue with reselect >= 4.1.0
- In TS, import and require syntax give difference behaviors HOT 1
- Can't use options `memoize` and `memoizeOptions` HOT 2
- Discussions on the project HOT 1
- Can selector functions be used to populate variables in the cacheKey? HOT 6
- include key resolvers HOT 3
- Resolver function does not receive same arguments as the final selector function HOT 4
- Selector recomputes every time HOT 5
- Typescript: isValidCacheKey() expects 0 arguments HOT 1
- Typescript: Selector type does not handle additional arguments HOT 7
- Documentation lacks any reference to `createStructuredSelector` HOT 13
- Evaluate option to provide `keySelector` with same args as `resultFunc` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from re-reselect.