Skip to content

Commit

Permalink
def top
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Oct 20, 2021
1 parent 5e64fe3 commit 3020d9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/style.js
Expand Up @@ -2,6 +2,7 @@ import React from 'react'
import { useStyleRegistry } from './stylesheet-registry'
import { computeId } from './lib/hash'

const useDOMEffects = React.useInsertionEffect || React.useLayoutEffect
export default function JSXStyle(props) {
const registry = useStyleRegistry()

Expand All @@ -15,7 +16,6 @@ export default function JSXStyle(props) {
return null
}

const useDOMEffects = React.useInsertionEffect || React.useLayoutEffect
useDOMEffects(() => {
registry.add(props)
return () => {
Expand Down

0 comments on commit 3020d9e

Please sign in to comment.