Releases: synacor/preact-context-provider
2.0.0-preactx.2 Support Preact X
Release 2.0.0-preactx.2
has been pushed to the preactx
tag in npm and supports Preact X (version 10).
1.2.1 Explicitly support preact < X
Update README with information on which versions support preact X, and update peerDependencies
in package.json to call out < 10
for preact support in the 1.x versions of preact-context-provider
.
1.2.0 Add getWrappedComponent() function to provide and mergingProvide decorated components
In order to help with unit testing (and likely other scenarios) the getWrappedComponent()
method has been added to all decorator functions. This combines with the same function provided by other related libraries like wiretie
, preact-i18n
, and preconf
so that it is easier to get the underlying decorated component for the purpose of spying/stubbing on methods in unit tests without having to arbitrarily export an unwrapped version of the component from the module.
1.1.1 Add <MergingProvider /> and mergingProvide()
This release adds a new <MergingProvider />
component and equivalent mergingProvide()
function that are the same as the existing <Provider />
and provide()
except that they can (selectively) merge in provided context objects with pre existing key values passed in by the parent, rather than overwriting them as the existing component/function do.
See the README for more documentation on their usage and examples.