# Solid Rendering Map ## Purpose Explain how Solid JSX executes and what that means for Motion component design. ## Docs Contract - Component functions run once for setup; state changes do not rerun the component body. - `createEffect` initial execution is scheduled after render phase. - `createRenderEffect` executes during render phase. - Refs are available by mount-time hooks and not guaranteed in initial render-effect runs. - `splitProps` and `mergeProps` preserve reactive property access. ## Motion API Viability ### `motion.div` - Member component syntax is valid and should be primary API. - Must preserve intrinsic prop typing and ref behavior. ### `motion.create(tag)` - Dynamic intrinsic components are viable for a secondary API. - Must preserve HTML/SVG typing and avoid reactivity loss when forwarding props. ## Prop Handling Rules - Do not eagerly destructure reactive props (`const { animate } = props`). - Prefer accessor reads in tracked scopes. - Partition props with `splitProps`: - motion concerns (`animate`, `initial`, `exit`, etc.) - DOM concerns (`class`, `style`, aria/data, events, ref) ## Adapter Implications - Component setup initializes stable state and wiring once. - Reactive effects observe prop intent changes. - Motion runtime performs frame updates independent of Solid render cycles. ## Safe To Rely On - One-time component setup model. - Reactive prop reads through `splitProps`/`mergeProps`. - Ref availability by mount lifecycle. ## Must Be Locally Tested - Member-component typing ergonomics (`motion.div`). - `motion.create` typing across HTML and SVG. - Ref forwarding behavior with prop spreads.