I'm trying to implement redux-orm and not sure of the best way to handle updating meta properties on my models. The return value of static reducers are ignored in the latest version, and looking through the API I can't see any way to modify the meta property from a model inside of the static reducer function.
IE, for standard entity state updates, here is the example from the repo:
static reducer(action, Book, session) {
switch (action.type) {
case 'CREATE_BOOK':
Book.create(action.payload);
break;
case 'UPDATE_BOOK':
Book.withId(action.payload.id).update(action.payload);
break;
case 'REMOVE_BOOK':
const book = Book.withId(action.payload);
book.delete();
break;
... this function calls the model directly and has no return value
I found a couple of examples of a static metaReducer implementation, but these are all with an older version. I could make a sibling reducer to handle this but I'd prefer for everything to be on my actual ORM entities, and to utilize the provided meta property.
If anyone has a simple example of implementing a meta reducer with the latest version of redux-orm it would be much appreciated.
Thanks!