mini-create-react-context
- Version 0.4.1
- Published
- 19.7 kB
- 2 dependencies
- MIT license
Install
npm i mini-create-react-contextyarn add mini-create-react-contextpnpm add mini-create-react-contextOverview
Smaller Polyfill for the proposed React context API
Index
Functions
Type Aliases
Functions
function createReactContext
createReactContext: <T>( defaultValue: T, calculateChangedBits?: (prev: T, next: T) => number) => Context<T>;Type Aliases
type ConsumerProps
type ConsumerProps<T> = { children: RenderFn<T> | [RenderFn<T>]; observedBits?: number;};type Context
type Context<T> = { Provider: React.ComponentClass<ProviderProps<T>>; Consumer: React.ComponentClass<ConsumerProps<T>>;};type ProviderProps
type ProviderProps<T> = { value: T; children?: React.ReactNode; observedBits?: any;};type RenderFn
type RenderFn<T> = (value: T) => React.ReactNode;Package Files (1)
Dependencies (2)
Dev Dependencies (23)
- @babel/core
- @babel/plugin-proposal-class-properties
- @babel/preset-env
- @babel/preset-react
- @babel/preset-typescript
- @types/enzyme
- @types/jest
- @types/react
- @wessberg/rollup-plugin-ts
- babel-jest
- enzyme
- enzyme-adapter-react-16
- enzyme-to-json
- jest
- prop-types
- raf
- react
- react-dom
- rollup
- rollup-plugin-commonjs
- rollup-plugin-node-resolve
- rollup-plugin-terser
- typescript
Peer Dependencies (2)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/mini-create-react-context.
- Markdown[](https://www.jsdocs.io/package/mini-create-react-context)
- HTML<a href="https://www.jsdocs.io/package/mini-create-react-context"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2325 ms. - Missing or incorrect documentation? Open an issue for this package.
