Giter VIP home page Giter VIP logo

Comments (4)

koistya avatar koistya commented on May 3, 2024

Sounds good to me. I don't see any possible issues with it. Each mini app will have its own routing. But.. is there an advantage of implementing it this way, as opposed to a single app (SPA) with purely client-side routing for all pages? In this case you can only use Web Api / SignalR from ASP.NET just for REST / HTTP / WebSockets endpoint and have all the front-end pages implemented with React.

from react-starter-kit.

brunoAltinet avatar brunoAltinet commented on May 3, 2024

Client-side approach has its drawbacks (high initial payload, fully client reliant (which makes it somewhat fragile), possible memory leaks between pages (especially since flux relies on singletons) etc.). I'd like to employ react as a server-side web renderer plus client-side behaviour library. I consider it a unique oportunity for react compared to angular, ember etc. . Plus, there are many existing asp.net mvc projects which could use an approach where you would just "sprinkle" react to get better UX from server-side pages, or embed an spa so that the experience is seamless (single css, header, footer). There are some examples of it, but they are very simplistic.
Btw, i noticed that the whole example is loaded at once, is there a partial load example (fetching pages on-demand etc.)

from react-starter-kit.

koistya avatar koistya commented on May 3, 2024
Btw, i noticed that the whole example is loaded at once, is there a partial load example (fetching pages on-demand etc.) — @brunoAltinet

That's actually a great suggestion. I'm going to update the sample, to make it load the actual page contents with Ajax requests (as opposed to bundling that content).

from react-starter-kit.

koistya avatar koistya commented on May 3, 2024

@brunoAltinet, so.. here is an example, how page contents can be extracted into separate files, in order to avoid embedding that stuff into the main application bundle: #49

When users navigates through the website, Ajax requests are made to /api/pages/{name} Web API endpoint, and page contents is loaded to React app asynchronously.

To-Do: Need to update the bundling and pre-rendering logic to support this scenario.

from react-starter-kit.

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.