Skip to content

Commit

Permalink
frame by frame fix
Browse files Browse the repository at this point in the history
  • Loading branch information
robertfmurdock committed Jul 9, 2023
1 parent 9f778f7 commit 5e15b65
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import com.zegreatrob.coupling.client.components.player.PlayerConfigContent
import com.zegreatrob.coupling.client.components.spin.PrepareSpinContent
import com.zegreatrob.coupling.model.CouplingSocketMessage
import com.zegreatrob.coupling.model.pin.Pin
import com.zegreatrob.minreact.ReactFunc
import com.zegreatrob.minreact.add
import com.zegreatrob.minreact.nfc
import com.zegreatrob.testmints.action.async.SuspendAction
Expand Down Expand Up @@ -43,14 +44,11 @@ external interface DemoPageFrameProps : Props {
var state: DemoAnimationState
}

@ReactFunc
val DemoPageFrame by nfc<DemoPageFrameProps> { (state) ->
val popperRef = useRef<HTMLElement>()
val arrowRef = useRef<HTMLElement>()

val (referenceElement, setReferenceElement) = useState<ReferenceElement?>(null)

println("STATE IS $state")

val popperInstance = usePopper(referenceElement, popperRef.current, popperOptions(arrowRef, state))

useLayoutEffect(state) {
Expand Down

0 comments on commit 5e15b65

Please sign in to comment.