next.js
c6343db7 - [segment explorer] reset error and not-found boundary (#81115)

Commit
179 days ago
[segment explorer] reset error and not-found boundary (#81115) ### Description Add a `key` prop to the segment state boundary and change the key when we call reset, this way it will force the children re-render with the new state where the boundaries will get reset and the simulated error will be gone since we're rendering the page component now. Reseting the error boundary only won't help, it will still get the error from `getDerivedStateFromError` class method and apply to the state. This approach will reset the state group of layout-router, and ensure we keep rendering the page segment (or anything by default). ### Video https://github.com/user-attachments/assets/f6fc21da-abc1-41fc-857f-136a203f6039 Closes NEXT-4583
Author
Parents
Loading