- Reducer: An entity update action no longer causes the reducer to throw if an
id
-field contains the value0
. Instead, now onlynull
orundefined
are checked as an invariant. (Thanks to @zachcoyle)
- Reducer: If entities are updated and the new data does not contain a relation field at all, the references of that field are no longer deleted. (E.g. when an article is updated and does not contain an
author
-field anymore, the reference to the author is kept until explicitly removed byauthor: null
)
- All: Fix
EntityType
that broke type checker in dependent projects due to it only stating an object with anid
-field
- All: Published package now contains
.js.flow
-files to simplify flow type distribution
- Reducer: Schema map inside state is now nested inside a
schemaEntities
-field (this is not considered a breaking change, since selectors still work) - Reducer: Now, when receiving a deletetion action, not only is the entity deleted but also all references to that entity from other entities are removed (e.g. when a comment is deleted, the
comments
in the article does not contain the comment afterwards anymore) - Reducer: Updating entities is now way faster (1000 entities in ~3 seconds instead of 30) due to no longer deep-cloning the entire state.
- Selectors: All selectors are now based on reselect to heavily improve rendering performance
- All: Support hard deletion of entities through new
deleteEntityAction(schema: string, id: string)
- Selectors: Selectors are now longer exported but need to be created via
createSelector(schemaMap)
which will apply denormalization by default
- Actions: Missing export of
updateEntitiesAction
- Actions: Re-adds a "real"
updateEntitiesAction()
to update an array of entities of the same schema
- All: Add strangelog to maintain a changelog
- Selectors: Now exposing two selectors
selectEntity(schema: string, id: string)
andselectEntities(schema: string, ids?: string[])