-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Conversation
β Deploy Preview for nuxt3-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Add Added document and composables |
Thanks for PR. I personally like it if renamed to |
useLayout
function to help users to switch layout
useLayout
utility
Currently, it can. Maybe it will have more missions in the future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, we don't want to have useLayout(layoutName: string)
as the API. (If we used useLayout
we would want it to return a ref to the layout, I think.)
setLayout
does make sense, and I think preserves the opportunity to add more helpers if needed. We would need to document that this will work on the client, or (if on server) must be used within nuxt route middleware, and, moreover, persisted via a useState
so that the client can ensure that the layout it renders is the same.
Possibly we could also implement this workflow - when !nuxtApp.isHydrating? - within this PR.
See https://github.com/nuxt/framework/issues/6824#issuecomment-1222604779.
Yes. Named |
@516310460 FYI, I'll be looking at this shortly to see if it's possible to implement my comment above in this PR. |
Yes, I updated the source code to automatically trigger this PR |
Is there a reason you closed this? |
I need to submit first :) This PR, after waiting for development and testing to complete, I'm reopening |
Oh, I see. You can also use multiple branches in your fork for different PRs. (Might be easier.) |
Thanks, I've never done this before, I'll try this in the future |
useLayout
utilitysetLayout
utility
@danielroe Thanks you. source context |
My to-do list before merging:
|
Makes sense to call it @516310460 Since this PR is made from your @danielroe Do you mind if I move forward with branch creation to merge and letting you opening new PR from branch once could? |
@516310460 Also do you have a discord account? I would like to talk with you with daniel and helping on contribution process together. |
I have an account number |
Perfect. Mind to send a DM to me? pi0#6582 |
@pi0 Thanks, yes please! |
Good Please wait a moment. I was having dinner |
@pi0 I have already DM you |
Co-authored-by: HomWang <516310460@qq.com>
π Linked issue
β Type of change
π Description
π Checklist