Skip to content

Instantly share code, notes, and snippets.

@steveruizok
Created June 21, 2019 11:14
Show Gist options
  • Save steveruizok/c57908ab22bb36a11246b7e538fef469 to your computer and use it in GitHub Desktop.
Save steveruizok/c57908ab22bb36a11246b7e538fef469 to your computer and use it in GitHub Desktop.
A Framer X code component that returns a "decorated" code component.
import * as React from "react"
import { Frame, FrameProps } from "framer"
import { observer } from "mobx-react"
import { store } from "./store"
const DecoratedCounter = observer(props => {
return <Frame onTap={store.increment}>{store.count}</Frame>
})
export const Counter = props => {
return <DecoratedCounter {...props} />
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment