## Documentation / Examples
- [x] Make sure the linting passes
## Explanation
Fixes#27465
I added some docs on how to use per page persistent layouts in TypeScript as this requires you to extend some types and it might not be trivial if you are just starting out with TypeScript.
I copied the js example so it might be better to remove some of the duplication where possible, let me know.
All feedback is welcome
## Documentation / Examples
- [x] Make sure the linting passes
Fixes#27252 by using a named function rather than an arrow function. If this is the correct fix, then modifications are also needed for the `layout-component` example, but I'm just providing this one modification right now in case this fix is incorrect.
- Helps clear up customer confusion about how to share React state with layouts, including nested layouts
- Provides guidance on best practices before shipping your application to production
Open to any feedback!