Replies: 2 comments 4 replies
|
In the meanwhile, it may help to look at the real implementation on this file. |
|
@jjhiggz "Trying to think of other use cases, but currently can't. There's gotta be some though" I think I have one. Imagine a layout like a github's repo: one RepoLayout, which renders the top tab view, and within that say 2 child pages: RepoCode and RepoSettings. RepoLayout loads a Repo from the API, so that you can populate the tab bar with the name etc, which also includes some property Before you load the RepoSettings page, you want to check if the settings are editable by the current user. If they're not editable, you want to 404 (that's what github does). RepoSettings could query the Repo from the API itself, but that's already been loaded by the layout, and . If you use So, I suppose considering auth as well, more generally the use-case for |
Uh oh!
There was an error while loading. Please reload this page.
As far as I can tell, there isn't a dedicated section for comparison between these two lifecycle methods. It would be nice to have a mention of recommended usage for both, which method is better for x and which one is better for y.
All reactions