Skip to content

Instantly share code, notes, and snippets.

import { forwardRef, type ComponentType } from "react"
import { createStore } from "https://framer.com/m/framer/store.js@^1.0.0"
// [1] Store (Save states globally)
// This is the same as the variables in the Framer Canvas
const useStore = createStore({
// key: value
// value is string, number, boolean, object, array, etc..
// string should have quotes ("")
// boolean could have true, false
import { forwardRef, type ComponentType, useEffect } from "react"
import { createStore } from "https://framer.com/m/framer/store.js@^1.0.0"
// localStorage에서 초기값 로드
const storedLikes = localStorage.getItem("likes")
const storedUserLiked = localStorage.getItem("userLiked")
const useStore = createStore({
background: "green",
likes: storedLikes ? Number(storedLikes) : 1000,
import { forwardRef, type ComponentType } from "react"
import { createStore } from "https://framer.com/m/framer/store.js@^1.0.0"
// 공통 store 정의
const useStore = createStore({
count: 0,
})
// 1. 버튼 클릭 시 count 증가
export function clickButton(Component): ComponentType {
import React, { useState, useRef, useEffect } from "react"
import * as THREE from "three"
export default function Like3D(props) {
const [likes, setLikes] = useState(42)
const [isLiked, setIsLiked] = useState(false)
const mountRef = useRef(null)
const sceneRef = useRef(null)
const heartRef = useRef(null)
const rendererRef = useRef(null)
import { useState, useEffect, useRef, startTransition } from "react"
import { addPropertyControls, ControlType, useIsStaticRenderer } from "framer"
import {
motion,
useAnimation,
useMotionValue,
useTransform,
AnimatePresence,
} from "framer-motion"
import { forwardRef, type ComponentType } from "react"
import { createStore } from "https://framer.com/m/framer/store.js@^1.0.0"
const useStore = createStore({
background: "green",
likes: "1",
userLiked: false,
})
// Get Started: https://www.framer.com/developers
import { addPropertyControls, ControlType } from "framer"
import { useState } from "react"
/**
* @framerSupportedLayoutWidth auto
* @framerSupportedLayoutHeight auto
*/
export default function Button({ title, loadingText }) {
import * as React from "react"
import * as p5 from "p5"
import { Frame, addPropertyControls, ControlType } from "framer"
const w = 375
const h = 812
const Y_AXIS = 1
const X_AXIS = 2
let b1, b2, c1, c2
import React, {
useState,
} from 'react'
function Example() {
const [
count,
setCount,
] = useState(
0
export default () => <div>File one</div>;