2.0.6 • Published 3 years ago

@fcannizzaro/react-use-cookie-watcher v2.0.6

Weekly downloads
31
License
MIT
Repository
github
Last release
3 years ago

@fcannizzaro/react-use-cookie-watcher

react hook to watch browser cookies

NPM JavaScript Style Guide

Install

yarn add @fcannizzaro/react-use-cookie-watcher

Usage

import React, { Component } from 'react'

import { useCookieWatcher, useCookie } from '@fcannizzaro/react-use-cookie-watcher'

const Example = () => {

  // cookie existence
  const isNotExpired = useCookieWatcher('react-cookie', 500);

  // cookie value
  const cookie = useCookie('react-cookie');

  return <div>cookie {isNotExpired ? 'found' : 'not found'}</div>

}

License

MIT © fcannizzaro

2.0.3

3 years ago

2.0.2

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.6

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago