You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support SSR and hydration for Motion host components #2489
With Octane 0.16.7, @octanejs/motion 0.1.67, and Vite 8.3.4, load this component through Vite's ssrLoadModule with the Octane plugin and @octanejs/motion included in ssr.noExternal.
Vite's server import fails with The requested module 'octane/server' does not provide an export named 'provideContext'. The Motion entry also uses the client host primitive hostComponent.
Expected behavior
The normal Motion import renders a host and its nested content in SSR.
SSR emits initial variant styles, including the final keyframe when initial={false} and the units on transforms and dimensions.
Hydration adopts the existing host and nested SVG nodes. The client animation controller attaches to the adopted host.
A prototype using a server-only host descriptor emitted the expected styles, but the existing client path replaced all four hosts and nested SVGs in the fixture during hydration. Returning the same host descriptor from both renderer paths preserved every node and initial style. That points to a shared host path with a ref for the existing client animation controller.
Activity