How to bind the following in Rescript.
import { motion } from "framer-motion"
export const MyComponent = ({ isVisible }) => (
    <motion.div animate={{ opacity: isVisible ? 1 : 0 }} />
)
Thanks.
How to bind the following in Rescript.
import { motion } from "framer-motion"
export const MyComponent = ({ isVisible }) => (
    <motion.div animate={{ opacity: isVisible ? 1 : 0 }} />
)
Thanks.
Would something like this work for you?
module FramerMotion = {
  type animate = {opacity: float}
  @module("framer-motion") @scope("motion") @react.component
  external div: (~animate: animate) => React.element = "div"
}
let div = <FramerMotion.div animate={opacity: 1.0} />