wevm / frog

Framework for Farcaster Frames 🐸
https://frog.fm
Other
408 stars 94 forks source link

Unable to use `children` prop in separate component after v0.9 #326

Closed scottrepreneur closed 3 months ago

scottrepreneur commented 3 months ago

Describe the bug

I am creating a <BaseLayout> component to handle some common cases across all frames. Passing the remainder of the frame through to the children props.

Gives an error

TypeError: Cannot add property __context, object is not extensible

Can't tell if this was a feature or a bug, but it seems to have worked for me in frog@0.9.2.

Link to Minimal Reproducible Example

https://github.com/scottrepreneur/frog-children

Steps To Reproduce

  1. Run pnpm dev
  2. Load initial frame
  3. No image loaded, error in terminal

Frog Version

0.11.2

TypeScript Version

5.4.5

Check existing issues

Anything else?

Interestingly, it works in the same route as seen here. https://github.com/scottrepreneur/frog-children/tree/same-place

scottrepreneur commented 3 months ago

Use /** @jsxImportSource frog/jsx */ at the top of component files for proper processing.