react-cookie
- Version 7.2.2
- Published
- 71.2 kB
- 3 dependencies
- MIT license
Install
npm i react-cookie
yarn add react-cookie
pnpm add react-cookie
Overview
Universal cookies for React
Index
Functions
function useCookies
useCookies: <T extends string, U = { [K in T]?: any }>( dependencies?: T[], options?: CookieGetOptions) => [ U, (name: T, value: Cookie, options?: CookieSetOptions) => void, (name: T, options?: CookieSetOptions) => void, () => void];
function withCookies
withCookies: <T extends ReactCookieProps>( WrappedComponent: React.ComponentType<T>) => React.ComponentType<Omit<T, keyof ReactCookieProps>>;
Classes
class CookiesProvider
class CookiesProvider extends React.Component<ReactCookieProps, any> {}
constructor
constructor(props: ReactCookieProps);
property cookies
cookies: Cookies;
method render
render: () => React.JSX.Element;
Type Aliases
type ReactCookieProps
type ReactCookieProps = { cookies?: Cookies; defaultSetOptions?: CookieSetOptions; allCookies?: { [name: string]: Cookie; }; children?: any; ref?: React.RefObject<{}>;};
Package Files (5)
Dependencies (3)
Dev Dependencies (6)
Peer Dependencies (1)
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/react-cookie
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/react-cookie)
- HTML<a href="https://www.jsdocs.io/package/react-cookie"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2400 ms. - Missing or incorrect documentation? Open an issue for this package.