- Removes the following APIs
StoreDependencyMixin
connectWithState
- Adds a
useStoreDependency
hook for use withreact@^16.8.0
. prop-types
added as a peer dependency as it has been removed from the main React package- Migrated from Flow to TypeScript
- Support React 16.x by using [email protected] (without
ForwardRef
support)
- Stores created with
GeneralStore.define()
supportdefineName
- Fixes the function as the latest version of the extension uses
unsubscribe
instead ofdisconnect
.
- Adds the ability to use the Redux Devtools Extension to inspect the state of stores.
- fixes the name that developer tools show for wrapped components that don't have displayName attributes (eg
Connected(undefined)
is nowConnected(BaseComponent)
)
connectWithState
no longer exports invalid propTypes
connectWithState
wraps a normalconnect
in a state container to fill theStoreDependencyMixin
use case HubSpot#55
- connect adds a
focus
method that calls through toBaseComponent.focus
- connect adds a static
dependencies
field to the connected component - connect adds a static
WrappedComponent
field mirroring react-redux
- Fix a potential bug in connect/StoreDependencyMixin that could cause an exeption in
componentWillUnmount
- Component generated by
connect
inherits propTypes unrelated to the store dependencies from the BaseComponent
- exports
connectCallback
from the index module
- adds
InspectStore.isStore
- adds
connectCallback
for subscribing to dependencies outside of React - consolidate some invariant checks into shared functions
- adds
StoreFactory#defineName
- adds
Store#toString
- adds
GeneralStore.InspectStore
for examining internal state of a store - removes
Store#getActionTypes
- removes
Store#getDispatcher
- removes
Store#getDispatchToken
- removes
Store#getFactory
- removes
Store#getID
defineGetInitialState
allows redefinition for your testing convenience
connect
transfers static properties/methods from theBaseComponent
to theConnectedComponent
- upgrade to
[email protected]
and accompanying type fixes
- FIX: resolves a bug in
StoreDependencyMixin
where state wasn't passed through incomponentWillReceiveProps
#46
- FIX: throw if more than one
StoreDependencyMixin
is detected on a component #45
- FIX: make sure
connect
is actually exported!
- FIX: throw if no dispatcher is specified
- BUILD: rearrange the dist/lib folders to match other HubSpot projects
- FIX: #26 by making each dependency a dispatch handler
- NEW: higher order component decorator for store dependencies
- PERF: optimizes derefs according to the arity of the deref function
- PERF: optimizes updates by only recalculating if the actionType affects them
- REMOVE: internal "shouldComponentUpdate" type filters
- REMOVE: support for multiple StoreDependencyMixins in the same component
- NEW: support flux standard actions #43
- NEW: compound fields can specify propTypes
- NEW: GeneralStore.defineFactory() allows for more composable/testable stores
- added StoreFactory
- StoreDefinition -> StoreSingleton
- StoreSingleton is based on StoreFactory
- StoreFacade -> Store
- dependency updates (flow 0.16)
- fix "define" function conflict with ES6 modules and GeneralStore.define
- disable the eslint "indent" rule because its breaking the build
- immutable-is: pull in a copy of Immutable.is() instead of trying to sideload immutable itself
- transpile with babel
- build with webpack
- Dont throw from
DispatcherInstance.get()
(still throws fromStoreFacade.register()
)
- remove a duplicate argument name breaks babel
- BREAKING (for non-FB-disapatcher users): adds calls to
dispatcher.waitFor()
anddispatcher.isDispatching()
- BREAKING:
deref
no longer receives a default object forstate
if the actual state is falsey - dedups
setState
for fields with dependencies on multiple stores - dedups
setState
across mixin instances - dedups
setState
for stores with common action responses
- StoreDependencyMixin: fix a bug when using multiple mixins on one component
- StoreDependencyMixin: update fields based on props in
componentWillReceiveProps
- StoreDependencyMixin: update fields based on state in
componentWillUpdate
and be sure to merge withnextState
- compound fields: the
store
property is nowstores
and requires anArray<StoreFacade>
- compound fields: the
deref
property is required - compound fields: the
deref
function now receives anArray<StoreFacade>
as its thrid argument instead of a singleStoreFacade
- invariant exceptions are thrown in the production build
- more verbose errors with helpful links
- strip verbose errors in the production build
- allow succint registering of one response to multiple actions
- first usable alpha