Comments (4)
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.
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.
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.
@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)
- Need help building an old website from 2016 HOT 5
- Error 500: Unexpected token < in JSON at position 0 HOT 3
- SPAM
- 'Cannot find module' Error for cached modules in VSCode HOT 1
- Minor issue running 'Relay' with Yarn HOT 1
- Cannot find module ... TypeScript error in VSCode HOT 1
- Hot Reload not working properly HOT 1
- Hot Reload CSS and JS files changes HOT 1
- Cannot open started application due to Firebase error HOT 2
- site.manifest error - comma missing
- What kind of API token templates should I use? HOT 1
- Where's node_modules?
- Where's node_modules? HOT 1
- Error on first start. TT HOT 2
- Network: use --host to expose HOT 1
- Codespaces not working with "Use Template" (workaround: clone/fork/duplicate repo) HOT 5
- The engine "node" is incompatible with this module. Expected version "10". Got "18.14.0" HOT 5
- Shipping with Google_Cloud_Credentials Issue HOT 2
- Login Dialog is not showing up
- Unable to add packages using Yarn HOT 1
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 react-starter-kit.