react-cookie
Advanced tools
Comparing version 2.0.7 to 2.0.8
{ | ||
"name": "react-cookie", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "Universal cookies for React", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -68,2 +68,17 @@ <h3 align="center"> | ||
```js | ||
// Root.jsx | ||
import React from 'react'; | ||
import App from './App'; | ||
export default function Root() { | ||
return ( | ||
<CookiesProvider> | ||
<App /> | ||
</CookiesProvider> | ||
); | ||
} | ||
``` | ||
```js | ||
// App.jsx | ||
import React, { Component } from 'react'; | ||
@@ -99,6 +114,6 @@ import { instanceOf } from 'prop-types'; | ||
return ( | ||
<CookiesProvider> | ||
<div> | ||
<NameForm name={name} onChange={this.handleNameChange.bind(this)} /> | ||
{this.state.name && <h1>Hello {this.state.name}!</h1>} | ||
</CookiesProvider> | ||
</div> | ||
); | ||
@@ -105,0 +120,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13006
227