This repository was archived by the owner on Nov 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 1- # mini-create-react-context
1+ # mini-create-react-context
2+
3+ <p align =" center " >
4+ <a href =" https://packagephobia.now.sh/result?p=mini-create-react-context " >
5+ <img alt="npm install size" src="https://packagephobia.now.sh/badge?p=mini-create-react-context">
6+ </a >
7+ <a href =" https://bundlephobia.com/result?p=mini-create-react-context " >
8+ <img alt="npm bundle size" src="https://img.shields.io/bundlephobia/min/mini-create-react-context.svg?style=flat-square">
9+ </a >
10+ <a href =" https://www.npmjs.com/package/mini-create-react-context " >
11+ <img alt="npm" src="https://img.shields.io/npm/v/mini-create-react-context.svg?style=flat-square">
12+ </a >
13+ </p >
214
315> (A smaller) Polyfill for the [ proposed React context API] ( https://github.com/reactjs/rfcs/pull/2 )
416
517## Install
618
719``` sh
8- npm install create-react-context
20+ npm install mini- create-react-context
921```
1022
1123You'll need to also have ` react ` and ` prop-types ` installed.
@@ -32,7 +44,7 @@ const Context = createReactContext(defaultValue);
3244``` js
3345// @flow
3446import React , { type Node } from ' react' ;
35- import createReactContext , { type Context } from ' create-react-context' ;
47+ import createReactContext , { type Context } from ' mini- create-react-context' ;
3648
3749type Theme = ' light' | ' dark' ;
3850// Pass a default theme to ensure type correctness
You can’t perform that action at this time.
0 commit comments