Comments (7)
Why do you render the list from the server in the first place though? Why not just render JSON?
If you have no control over what the server renders, then I think this is the only way to do it.
BTW, please only submit documentation-related issues here. General questions should be posted here: https://github.com/vuejs/Discussion/issues
from v2.vuejs.org.
Aps, sorry yeah, didn't notice I was not on the good place. Possible to move it ?!
You would suggest to render a JSON object in a <script></script>
directly, in order to pass data to JS ?
I just dislike this way, I personally find it hacky too...
And I don't really want to build an asynchronous stuff, at this step.
from v2.vuejs.org.
I don't think rendering to JSON is dirty, it's more like embedding JSON data in your HTML so that it can be sent down to the client within a single request, and is in fact cleaner than initializing data in the vue template.
from v2.vuejs.org.
Okay, thanks for your feedback :)
I guess we can close the issue, at this point!
from v2.vuejs.org.
It's era of rendering things on client side, mate :) I also recommend not doing almost any kind of rendering on server side.
from v2.vuejs.org.
Not sure to get what you mean by server-side rendering?
I just do not especially like to expose JSON data globally on client-side, but nvm, I just remove this exposition once the Vue parsed it.
from v2.vuejs.org.
I meant rendering HTML on server side, but just return data like JSON. But yeah, it's everybody's preference.
from v2.vuejs.org.
Related Issues (20)
- VSCode Debugger for Chrome / Firefox Extension Has Been Deprecated, This Document Need To Be Update. HOT 2
- Does Component Naming Apply To The File Name as Well?
- Anybody know how to make ide to identify the global scss import in vue.config.js?
- The computed usage provided in the documentation seems to be inconsistent with the type definition
- run ``npm run build``, size of file is 0B HOT 2
- Vue router 4 document doesn't support Korean language. HOT 2
- CDN version 2.6 notworking. HOT 1
- vue.config.js是否可以内置到脚手架
- Search bar redirects to v3 docs instead of searching v2 docs. HOT 2
- v-if and v-for priority
- Documentation out of date for debugging in VSCode
- Fetch API articles link is broken HOT 1
- v-if not work with template like in document of vue 2
- Link to v2.vuejs.org page in description of repository details HOT 1
- v-bind:style use quotes with kebab-case did not work HOT 2
- French translation of v2 website is broken : 404 page HOT 6
- Inaccuracy in comparisons guide HOT 1
- Inaccuracy in comparisons guide
- [Vue warn]: Unknown custom element: <search> - HOT 2
- Wrong permanent redirection leads to 404 error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from v2.vuejs.org.