Skip to content

Commit

Permalink
Latest
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgperry committed Feb 15, 2023
1 parent dbd1208 commit 29010fd
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/framer-motion/src/motion/utils/use-visual-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,15 @@ export function useVisualElement<Instance, RenderState>(
const visualElement = visualElementRef.current

useInsertionEffect(() => {
if (!visualElement) return
visualElement.update(props, presenceContext)
visualElement && visualElement.update(props, presenceContext)
})

useIsomorphicLayoutEffect(() => {
if (!visualElement) return
visualElement.render()
visualElement && visualElement.render()
})

useEffect(() => {
if (!visualElement) return
visualElement.updateFeatures()
visualElement && visualElement.updateFeatures()
})

/**
Expand Down

0 comments on commit 29010fd

Please sign in to comment.