react-native-patina
Advanced tools
+11
-11
| # react-native-patina | ||
| ## 0.1.6 (2021-11-02) | ||
| - fixed: Close a race condition in `ThemeProvider`. | ||
| ## 0.1.5 (2021-07-28) | ||
| ### Fixed | ||
| - fixed: Fix the Flow component-type definitions, so props-checking works again. | ||
| - fixed: Stop including raw source code in the NPM package. | ||
| - Fix the Flow component-type definitions, so props-checking works again. | ||
| - Stop including raw source code in the NPM package. | ||
| ## 0.1.4 (2021-07-07) | ||
| ### Fixed | ||
| - fixed: Be more explicit about component return types, to help Flow & Typescript return more accurate errors. | ||
| - Be more explicit about component return types, to help Flow & Typescript return more accurate errors. | ||
| ## 0.1.3 (2020-08-19) | ||
| - (fix) The `ThemeProvider` component would incorrectly provide the initial theme, even if the theme had been changed. | ||
| - fixed: The `ThemeProvider` component would incorrectly provide the initial theme, even if the theme had been changed. | ||
| ## 0.1.2 (2020-08-06) | ||
| - Fix more Typescript type definitions: | ||
| - fixed: Fix more Typescript type definitions: | ||
| - Export `ThemeProviderProps`. | ||
| - Tighten `cacheStyles` to require valid React Native styles as its return type. | ||
| - Switch to hooks internally for shorter code. | ||
| - changed: Switch to hooks internally for shorter code. | ||
| ## 0.1.1 (2020-07-02) | ||
| - Fix the user-facing type definitions: | ||
| - fixed: Fix the user-facing type definitions: | ||
| - `cacheStyles` no longer turns the style types into `unknown`. | ||
@@ -31,0 +31,0 @@ - `ThemeProvider` and `withTheme` use `React.ComponentType` now. |
@@ -26,3 +26,9 @@ import * as React from 'react'; | ||
| const [themeState, setThemeState] = React.useState(theme); | ||
| React.useEffect(() => watchTheme(setThemeState), []); | ||
| React.useEffect(() => { | ||
| if (theme !== themeState) | ||
| setThemeState(theme); | ||
| return watchTheme(setThemeState); | ||
| }, | ||
| // eslint-disable-next-line react-hooks/exhaustive-deps | ||
| []); | ||
| return (React.createElement(Context.Provider, { value: themeState }, props.children)); | ||
@@ -29,0 +35,0 @@ } |
+1
-1
| { | ||
| "name": "react-native-patina", | ||
| "version": "0.1.5", | ||
| "version": "0.1.6", | ||
| "private": false, | ||
@@ -5,0 +5,0 @@ "description": "A simple, type-aware theming library", |
13054
2.19%145
4.32%