Vue.js – route lazy loading


As we all know, Vue is used to build user interfaces.

Vue also needs routing to realize the jump between different pages, which naturally involves the problem of speed.

In order to improve user experience, routing lazy loading method is used in Vue.

Lazy loading of Routing: reduce the number of components requested from the server during the first loading, and then request the corresponding components from the server when the routing is accessed.

Writing format:

    const foo = () => import('./foo.vue');

Recommended Today

Build HTTP service with C + + Mongoose

Mongoose source code address:… Mongoose user manual:… Mngoose set up HTTP service #include <string> #include “mongoose.h” using namespace std; static const char *s_http_port = “8000”; static void ev_handler(mg_connection *nc, int ev, void *ev_data) { struct http_message *hm = (struct http_message *) ev_data; if (ev == MG_EV_HTTP_REQUEST) { std::string uri; if (hm->uri.p && hm->uri.p[0] == ‘/’) […]