We went through steps to enable code splitting in Part 1. As mentioned in Part 1, it’s not working right at server-side rendering yet. What exactly the problem is? Exercise: see the problem with actual code You can skip this section if you already know the problem or don’t bother to run/test with actual code. You can see the problem…
-
-
React code splitting and server-side rendering with ASP.NET Core – Part 1
Thanks to [crayon-65672f55cb430424557334-i/], code splitting has become easy with dynamic [crayon-65672f55cb433655322884-i/]. However, for code splitting to work together with server-side rendering, things become more tricky and not that straight forward because at the server side, the modules have to be loaded synchronously in order to render the page correctly. There are several different available loaders that can help get the…
-
Simple long polling in ASP.NET Core SPA
Typically, ASP.NET MVC model handles requests by receiving the request, do some processing and then return the response, all within an action method. But in case of doing a long polling, we don’t have anything to return until the expected event occurs. Therefore, the long polling request needs to be able to wait for the event, without holding up the…
-
redux-first-router vs redux-little-router for React/Redux SPA
Client side routing is definitely one of the center piece of gears that empowers single page application. For our [crayon-65672f55cd6d2241623782-i/] projects, we have been using [crayon-65672f55cd6d6618468232-i/] that fits in reasonably well. Recently, I had a chance to hand on evaluating and trying out another router package, [crayon-65672f55cd6d7650614447-i/]. Both packages are designed with [crayon-65672f55cd6d8823749403-i/] in mind and so they both work and integrate well with…
-
route transition for redux-little-router, react ASP.NET Core
[crayon-65672f55cdafd926277905-i/] is a good client side routing library for project that uses [crayon-65672f55cdb00007783468-i/] and [crayon-65672f55cdb01888532781-i/]. However, adding transition to the route pages could be tricky. [crayon-65672f55cdb02421844310-i/] provides a react component [crayon-65672f55cdb03298116418-i/] for use to define the route pages. Each route page component will be wrapped by a [crayon-65672f55cdb04867461852-i/] component. As far as I know (after looking at the coding), [crayon-65672f55cdb05971541251-i/] component will render the route page…
-
Hot Module Replacement (HMR) with React, ASP.NET Core
Hot module replacement (HMR) or hot loading is a feature of webpack allowing real time update of modules while the application is running, which could significantly speed up development. Enable Hot module replacement Goal: To enable HMR in the React application in a simple setup. Base project code: Example code from React with Typescript, Get started with ASP.NET Core serves as starting…
-
React Routing with redux-little-router, ASP.NET Core SPA
React Routing with redux-little-router is part 5 of a 5 parts React with ASP.NET Core series. This series will show you the setup necessary for building React single page application with routing and server-side rendering. For traditional web site that server is responsible to render all web pages, each page change requires browser to request and re-run the page from…
-
React with Server Side Rendering, ASP.NET Core
React with Server Side Rendering is part 4 of a 5 parts React with ASP.NET Core series. This series will show you the setup necessary for building React single page application with routing and server-side rendering. With the advance of technologies and more power devices/computers, websites have evolved from simple static files, server side rendering to generate static HTML pages,…
-
React with Redux, Get started, with ASP.NET Core
React with Redux is part 3 of a 5 parts React with ASP.NET Core series. This series will show you the setup necessary for building React single page application with routing and server-side rendering. What is Redux? Official answer: Redux is a predictable state container for Javascript apps. In other words, it is a single data store to manage and…
-
React with Typescript, Get started with ASP.NET Core
React with Typescript is part 2 of a 5 parts React with ASP.NET Core series. This series will show you the setup necessary for building React single page application with routing and server-side rendering. When I first dived into migrating from traditional server side rendering towards more focus on client side rendering using React, one major decision to make was…