Replies: 2 comments 4 replies
-
You can populate and sort the initial data from server-rendered HTML like this: |
Beta Was this translation helpful? Give feedback.
-
This can be achieved by rendering the server-side code (Blade) and client-side code (petite-vue) together and then adding a v-cloak attribute and loading class to the server-side code and just a v-cloak attribute to the client-side code. Now add the following CSS:
This will hide the client-side code until it is mounted and do the reverse with the server-side code. This has the advantage that it is both SEO friendly and the user should not see a change in the UI before and after when it is mounted (providing the server-side code and client-side code produce the same result). |
Beta Was this translation helpful? Give feedback.
-
Let's say I'm working with Laravel Blade and I have a list that should be sorted. I could embed the array into
v-scope
or something similar and usev-for
but is there a way to display the list using Blade and have petite-vue take over (without destroying the server rendered content) so I can sort the list on the client?Beta Was this translation helpful? Give feedback.
All reactions