-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve hooks? #91
Comments
In Vue
The check for when it is run on SSR is possible, but the |
Indeed, the user would then have to use I think that's the only added value of
Indeed As for the naming,
Good point. Let me think about this. |
Imo |
How about we rename See also vikejs/vike-react#110 (comment) which is already implemented. Thoughts? |
Yea, I also thought about that. But I'd argue it's called before Vue rendering, not before I agree it's a bit misleading, but I'm thinking the pros outweights the cons. |
If we end up with But, yea, I do agree that I ain't sure, I'll think about it. |
Actually, how about |
So, no calling it before |
I think |
Yea, that's the trade off. Not sure either. |
Agreed, |
It's actually the same argument than But, yea, it's a bit misleading. |
Honestly I feel like it's ok to align it with |
I guess the only question left is: do we go for @pdanpdan WDYT? Also about the rest.
Yea, the long-term term goal is that most users just use Vike extensions. |
That's a good point, actually. Most users won't know about |
I'm not very sure about the implications.
But I don't have a clear image right now about what would be the advantages/disadvantages, so you can ignore my opinion for the moment. |
Makes sense. Although I'd still prefer the name
I share the sentiment, but on the other hand having too many hooks can backfire. A big list of hooks would make it significantly slower to 1. digest and 2. experiment with each potentially relevant hook. If you have only Personally, all-in-all, I prefer |
Some slightly better names 😅 but let's stick to the current ones and re-consider the following ones before releasing
Or maybe |
I would rather go with |
👍 Also we'll probably have plenty of new insights before we release |
onBeforeMount()
in favor ofonCreateApp()
? AFAICT theonBeforeMount()
hooks ofvike-{pinia,vue-query}
can be merged intoonCreateApp()
.onAfterRenderSSRApp()
in favor of a new hookonAfterRenderHtml()
that is called right beforeescapeInject
? Users could use!!pageContext.Page
to check whether the app is SSR'ing. Also, a neat thing here is that the new name would then align withvike-react
's hooks.The text was updated successfully, but these errors were encountered: