All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
3.3.2 (2022-04-18)
- Allow React 18 as a peer dependency (6611f1c)
3.3.1 (2022-04-18)
3.3.0 (2021-06-24)
3.2.0 (2021-03-01)
3.1.0 (2020-10-22)
3.0.1 (2020-09-08)
- Use empty object instead of string for NO_PROVIDER value (28dd2f8)
3.0.0 (2020-09-08)
-
Types now depend on TypeScript v4.0.
-
The deprecated function/object API has been removed.
Before:
import createUseContext from "constate"; const useCounterContext = createUseContext(useCounter); <useCounterContext.Provider> ... </useCounterContext.Provider>
After:
import constate from "constate"; const [CounterProvider, useCounterContext] = constate(useCounter); <CounterProvider> ... </CounterProvider>
2.0.0 (2020-02-15)
-
Support for the
createMemoDeps
parameter has been dropped.Before:
const useCounterContext = createUseContext(useCounter, value => [value.count]);
After:
const useCounterContext = createUseContext(() => { const value = useCounter(); return useMemo(() => value, [value.count]); });
- Deprecate old function/object API (#101) (c102a31)
- Remove deprecated
createMemoDeps
parameter (#100) (553405d)
1.3.2 (2019-10-20)
- Remove unnecessary code from production (a0d22bf)
1.3.1 (2019-10-20)
- Fix invalid attempt to destructure non-iterable instance (67001c4)
1.3.0 (2019-10-20)
- Add
sideEffects
field topackage.json
(97c0af5) - Expose API for splitting custom hook into multiple contexts (#97) (fc3426e), closes #93
1.2.0 (2019-06-29)
1.1.1 (2019-04-14)
- Fix React peer dependency range (7132e3d)
1.1.0 (2019-04-14)
1.0.0 (2019-02-06)
First official release.