Content pfp
Content
@
0 reply
0 recast
0 reaction

horsefacts pfp
horsefacts
@horsefacts.eth
New frame feature: frames can now pass up to 4kb of state to the frame server! This makes it easier for frame devs to build simple, stateful, reactive apps. (Think React state in your frame). See the stateful counter frame below for an example: https://stateful-counter-frame.vercel.app
23 replies
22 recasts
195 reactions

Moon pfp
Moon
@moon.eth
So when you pass it it gets sent back, and then you have to pass it again every POST or it disappears? or does it hang around until you clear it? What is the scope? Per-domain?
1 reply
0 recast
1 reaction

horsefacts pfp
horsefacts
@horsefacts.eth
Yeah, pass it on every request. If state is set in the body, the next request gets it as part of the frame message. Client apps don't maintain any state, just read it from the body. https://github.com/horsefacts/stateful-counter-demo/blob/3beb6842d7ebc68077097f39b38352897b6289dc/src/app/api/count/route.ts#L72
0 reply
0 recast
4 reactions