Next.js Discord

Discord Forum

Triggering State changes in parent layout from child component

Unanswered
Tufted Flycatcher posted this in #help-forum
Open in Discord
Tufted FlycatcherOP
The next docs says: Passing data between a parent layout and its children is not possible. However, you can fetch the same data in a route more than once, and React will automatically dedupe the requests without affecting performance. (https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts) but is there a work around for this or updates coming in the future? I want to trigger my setter function that lives in my root layout in next13, from my child component.

1 Reply