Giter VIP home page Giter VIP logo

Comments (2)

danielcherubini avatar danielcherubini commented on May 17, 2024 1

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

from express-vue.

danielcherubini avatar danielcherubini commented on May 17, 2024

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.
The server renders the view. Sends it to the client.
Done

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 need a post request setup on the client and the view.

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

from express-vue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.