This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { | |
| useState, | |
| } from 'react' | |
| function Example() { | |
| const [ | |
| count, | |
| setCount, | |
| ] = useState( | |
| 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default () => <div>File one</div>; |
NewerOlder