wafflepie / redux-syringe

💉 Maintaining large Redux applications with ease.
https://redux-syringe.js.org
MIT License
4 stars 2 forks source link

stop exposing entries on the store object #11

Closed wafflepie closed 3 years ago

wafflepie commented 3 years ago

when using multiple enhancers, only the last one's entries will be up-to-date

for example, when using compose(middlewareEnhancer, reducersEnhancer) with initialReducers and injecting a reducer afterwards, store.entries.reducers of the outermost store itself (i.e. the return value of createStore) will only contain the initially injected reducers, which is very misleading

wafflepie commented 3 years ago

fixed. the object stays, but is now reused when possible, meaning that it's always up-to-date