芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/node_modules/react-select/src/NonceProvider.js
// @flow import React, { Component, type Node } from 'react'; import { CacheProvider } from '@emotion/react'; import createCache from '@emotion/cache'; import memoizeOne from 'memoize-one'; type NonceProviderProps = { nonce: string, children: Node, cacheKey: string, }; export default class NonceProvider extends Component
{ constructor(props: NonceProviderProps) { super(props); this.createEmotionCache = memoizeOne(this.createEmotionCache); } createEmotionCache = (nonce: string, key: string) => { return createCache({ nonce, key }); }; render() { const emotionCache = this.createEmotionCache( this.props.nonce, this.props.cacheKey ); return (
{this.props.children}
); } }