Skip to content
This repository has been archived by the owner on Apr 25, 2021. It is now read-only.

v4.0.0

Compare
Choose a tag to compare
@AlecAivazis AlecAivazis released this 18 Apr 07:40
· 158 commits to master since this release

This version introduced a number of changes into the codebase resulting in a much more performant experience for the general user as well as adding increased support for adapting the responsive state to fit your particular use case.

StoreEnhancer

  • calculateStateInitially is now calculateInitialState
  • performanceMode is now default (no more throttled handler or associated options)

Reducer / Responsive State

  • no more height/width (see README for instructions on migration forward)
  • Added is field to responsiveState (browser.is.small <=> browser.mediaType === "small")
  • ReducerFactory now accepts options as second argument (after breakpoints)
  • infinityType argument is now the infinity field of the argument
  • user-defined fields can be added to the responsive state with the extraFields option which is defined as a function that takes the current responsive state and returns the new fields to add (is spread over old state so user could also overwrite values if they wanted)