Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
renderChild = (context: CSSContextType) => {
const { css } = this.props
const serialized = serializeStyles([css])
const rules = context.stylis(`.css-${serialized.name}`, serialized.styles)
if (this.sheet === undefined && isBrowser) {
this.sheet = new DynamicStyleSheet(StyleSheetOptions)
this.sheet.inject()
}
if (isBrowser) {
this.sheet.insertRules(rules)
}
const child = this.props.render(serialized.cls)
if (shouldSerializeToReactTree && rules.length !== 0) {
return (