Skip to content

v3.0.0

Latest
Compare
Choose a tag to compare
@ekosz ekosz released this 04 Jan 21:35
· 18 commits to master since this release

[BREAKING] Version 3.0

About a month ago I realized that in its current state, redux-falcor would never be super useful. Whenever I had an action that would need to invalidate the falcor cache, I needed to reload the page to clear the falcor and redux states. In versions 2.x there was not a good way to patch removals into the redux state from falcor. Not to mention the system did not play well with falcor's internal LRU garbage collection.

After talking with @trxcllnt last month I realized the only way to make the library truly useful would be to replace the redux state with the falcor state each time its changed instead of just patching the changes. That would require redoing the library from scratch. And so I did. This new version of redux-falcor is completely rewritten from scratch. The API is 100% different and requires all users of the library to rewrite their code to use the new code. I realize this may be a huge pain for many, and it definitely cost me 2 entire days of work rewriting my own code. But after using version 3.0 in production for about 2 weeks now I know it was the correct decision. The interactions between falcor and redux are almost seamless now and no more needing to reload the page.

Without further ado, the new API (which at least is much smaller).

Breaking

Everything.

Additions

<FalcorProvider store falcor> - A top level Component that allows the reduxFaclor method to connect Components to the redux-falcor store.
reducer(state, action) - The new name of the reducer. This needs to be including in the redux store to work have falcor state persisted in redux.
reduxFalcor(Component) - Acts like react-redux's connect. Connects a component to the overall redux-falcor context.

For more info on the API and a quick example please take a look at the rewritten README.