-
Notifications
You must be signed in to change notification settings - Fork 94
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
Does express-vue support dynamically changeable data push to the DOM? #41
Comments
This is how a server side rendered website is supposed to act. If you want it to dynamically update the client you'll need something like websockets. A good place to start is socket.io See server side rendered pages work like this. The client asks the server for the view. If the client wants something else. It's either a new page request. Or a REST action. So for instance let's say you have a button that tells the server that that variable is now 2. You can google how to do rest actions and apis. It's really straightforward. Or if you want it dynamic on the client from the server you'll need a websocketor something like it |
To give more information.. If you want something dynamic on the client, then do everything in the .vue files.. you can find documentation on http://vuejs.org but if you want say the client and the server to have the same information without reloading, then they need to communicate, either through a REST API, or via Websockets.. everything done on the client will be dynamic, thats the goal of this library, to have dynamic views using Vue.js, so everything on the client is dynamic, and then stuff on the server is static, so when a client requests a webpage, its sent in an initial state which you define.. then the client is dynamic from there. this isn't a problem with the library, so I'm closing this |
…in-0.51.0 Update flow-bin to the latest version 🚀
Does express-vue bind the data variables so that changes are pushed to the DOM in real time?
For example, I have the code block in Node.js:
This displays '1' in my component view as expected.
However, I would expect that by Vue.js standards, if I updates
myVar
to say,myVar = 2
via a timed function elsewhere in my code, that {{ displayVar }} in my view would change to say '2'? At the moment the new result doesn't show unless I manually refresh the page.Or do I have my understanding completely wrong of how express-vue is supposed to work?
The text was updated successfully, but these errors were encountered: