May 26, 2016
3.0.1

@ekosz ekosz released this Jan 4, 2016 · 18 commits to master since this release

Assets 2

[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.

Dec 15, 2015
3.0.0-beta2
Dec 15, 2015
3.0.0-beta1

@ekosz ekosz released this Nov 16, 2015 · 30 commits to master since this release

Assets 2

Fix: Don't set state.loading false prematurely

Before this fix if there were two parallel falcor requests, and one finished before the other, the redux loading state would be set to false even while the second request is still happening.

After this change redux-falcor now keeps track of each active request and only sets loading to false when there are none left.

Nov 16, 2015
2.3.2

@ekosz ekosz released this Nov 1, 2015 · 38 commits to master since this release

Assets 2

This release fixes some spelling mistakes I had littered about the code base. I had a hard time deciding whether or not to make this a major version change, but I don't think most people will need to change any code after this release.

Fixed spelling of "falcor" in action constants - Thanks @jmandzik !

This was a silly typo where the word "falcor" was spelled as "faclor" in the action constant strings. As long as you are using the constant itself, and not the misspelled string, you will not need to change any code.

Fixed spelling of "UnrecognizedActionTypeException" - Thanks @maxmechanic !

Again, a bad typo. The exception was spelled as "UnreconizedActionTypeException". This error is only used internally to the library so you should not need to change any code here either.

Thank you everyone for catching my dumb mistakes!

@ekosz ekosz released this Oct 24, 2015 · 44 commits to master since this release

Assets 2

This release adds one new action

clear

The clear action can be dispatched to clear out all of the falcor state from the redux store. This is useful for events like logout.

import { clear } from 'redux-falcor';

// Data in store
store.dispatch(clear())
// Data is not in store

Unlike other actions, this action does not return a promise. Also to note, this action currently does not touch the falcor cache, only the redux store.

@ekosz ekosz released this Oct 22, 2015 · 46 commits to master since this release

Assets 2

This release adds one new action and reverts changes made in v2.1.0:

setPaths

When one wants to set multiple values at the same time, setPaths is the way to do it.

Simple Example

store.dispatch(setPaths(
  { path: 'my.email', value: 'foo@bar.com' },
  { path: 'my.name', value: 'John Smith' },
));

Complex Example

const prefix = ['my'];
const data = {
  email: 'foo@bar.com',
  name: 'John Smith',
};
const pathValues = Object.keys(data).map(field => {
  return { path: prefix.concat(field), value: data[field] };
});

store.dispatch(
  setPaths.apply(this, pathValues)
);

This release also reverts all of the changes in v2.1.0. I misread the documentation and had it all wrong. I'm really sorry about that.