Closed as not planned
Description
Summary
Consuming RSC payload in a component using createFromFetch
causing the response to get appended in the DOM instead of replacing if not wrapped with Suspense
const RouteWrapper = () => {
const location = useLocation();
const [rscContent, setRscContent] = useState(null);
useEffect(() => {
const content = createFromFetch(
fetch("/rsc?location=" + location.pathname),
{
callServer,
}
);
setRscContent(content);
}, [location.pathname]);
return rscContent
};
Link to repositories
- Hydration appending RSC response to body - https://github.com/tata1mg/catalyst-core/tree/hydration-error
- Hydration causing mismatch - https://github.com/tata1mg/catalyst-core/tree/rsc-demo-routing