Open delphinemillet opened 5 years ago
k-redux-factory
is a lib that aim to access your data as fast as possible.
By using selectors you are safe about our possible internal state restructurations.
For example, we move from keyValue like that:
{ keys: [], array: [], data: {}, initialized: false }
to
{ data: [[]], initialized: false }
In this example if you didn't use our selectors, an upgrade of k-redux-factory could break your application. But if you used our selectors, it wouldn't.
Always prefers using lib API and not its internals, when you can!
Besides that I see these advantages:
moreover, if you want to try k-ramel
, you can access the state using k-redux-factory selectors in a quick way:
export default inject(store => ({
users: store.data.users.get(),
})(Component)
Sometimes, accessing an object in the state from a container is quickier to write than using its selector. I would like to know all the advantages of k-redux-factory selectors over the direct use the state.