mirror of
https://github.com/Mastermindzh/react-cookie-consent.git
synced 2025-02-23 18:54:04 +01:00
Correct import and hint for debugging the styling (#7)
* Correct import and hint for debugging * Moving "debugging it" up in the README * Moving "debugging it" down * Remove empty lines
This commit is contained in:
parent
8dde7ee8a1
commit
cda5a1390c
15
README.md
15
README.md
@ -30,7 +30,7 @@ import CookieConsent from "react-cookie-consent";
|
||||
```
|
||||
If you want to set/remove cookies yourself you can optionally import Cookie (straight from js-cookie) like this:
|
||||
```js
|
||||
import CookieConsent, { Cookie } from "react-cookie-consent";
|
||||
import CookieConsent, { Cookies } from "react-cookie-consent";
|
||||
```
|
||||
|
||||
Then you can use the component anywhere in your React app like so:
|
||||
@ -127,3 +127,16 @@ If you're crazy enough you can even make a rainbow colored bar:
|
||||
</CookieConsent>
|
||||
```
|
||||
|
||||
## debugging it
|
||||
|
||||
Because the cookie consent bar is only shown the first time, you need to remove the cookie, if you want to evaluate changes:
|
||||
|
||||
```js
|
||||
// import CookieConsent, { Cookies } from "react-cookie-consent";
|
||||
|
||||
{Cookies.remove("myAwesomeCookieName2")}
|
||||
<CookieConsent
|
||||
cookieName="myAwesomeCookieName2"
|
||||
>
|
||||
</CookieConsent>
|
||||
```
|
Loading…
Reference in New Issue
Block a user