Skip to content

How to introduce naive-ui ? #682

Answered by Mister-Hope
Trezedo asked this question in Q&A
Feb 10, 2022 · 1 comments · 6 replies
Discussion options

You must be logged in to vote

naive-ui may not support ssr rendering.

There is one thing you should know: ClientOnly only render client on client side, so if the component calls client only variables in setup functions, (e.g.: window, docuement), it will still work.

But, when the component or the library itself are referencing those variables in code direct (probably context or outside component and functions), those variables will be accessed while parsing and loading that module. Also, the component is not allowed to access dom unless in onMounted lifecycle.

Since I did not use native ui before, you should be better sure that it's ssr friendly, otherwise, you must take actions to make a workaround.

Also make sure yo…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Mister-Hope
Comment options

@Mister-Hope
Comment options

@Mister-Hope
Comment options

@Trezedo
Comment options

@Mister-Hope
Comment options

Answer selected by Mister-Hope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants