Can I make UI Router for React work starting from a subpath within UI Router for Angular? - angular-ui-router

My company is in the process of migrating from (Angular 1 + UI Router) to (React + UI Router).
While migrating bottom-up, is there any way to port an entire subtree from Angular's UI Router state tree to be managed by an instance of UI Router for React?
Thank you!

Related

SSR rendering Vue with Laravel

I have developed a Vue app and a Laravel app and connected them with Vuex,VueRouter and the API endpoints, now I want to implement SSR. So far I have found 2 methods for implementing SSR:
use PhpV8js and Render Vue SSR in Laravel blade
use 2 separate processes: Laravel (php-fpm) and VueSSR (node)
accept the request in Laravel and render session dependent data like user info, queries on repositories in json
pass session json to node proccess (with socket or http)
node process renders Vue app with session data and passes it back to laravel
laravel renders the SSR blade with rendered Vue app
my concerns for first the method is: I don't like using PhpV8js in production environment with lots of traffic and a Vue component heavy app!
for second one: I don't know if passing html pages back and forth between socket apps is a good idea.
for a production environment which of these do you prefer? which will be the most performant? and are there other ways to accomplish Vue+Laravel SSR?

MPA with Laravel and Vue ( hybrid approach )

I'm trying to understand when and how to mix the Laravel and Vue components in a web app.
MPA where each blade view consists of a Vue component
Is it ok to have server-side routing and each view to consist of a Vue component ? Or in this case it would be better to make an SPA ? ( More specifically, here the question is whether there is a benefit of having server-side routing instead of client-side routing ? )
Taking as a reference stack overflow.
When you click on a Question the page refreshes which means that a GET request is sent to the back-end and where a new html file is sent to front-end.
When you create a Question, a new file is sent from the back-end and the page again reloads.
However, the content of the Question itself, seems to be dynamic because you can edit the Question or a Reply, but then again when you save the change, the page reloads.
In this case, what is the benefit of communicating with the server with a GET/POST instead of making an AJAX call, taking into consideration that the content of the page is rendered on the client-side with JS which is not SEO-friendly ?
What are the upsides and downsides of this approach ?

Blazor Hub Does not Connect Across Entire MVC App

I upgraded an ASP.NET Core 2.2 MVC project to 3.0 in order to use a Blazor component in one of the views of the application. After setting up Blazor in the MVC project and running it, the Blazor hub connects just fine as shown in the browser console screenshot below:
but when I navigate to the page that contains the blazor component or another page besides the index page for that matter, I get this:
As shown in the screenshot, it includes the name of the controller the url that negotiates for a websocket connection and throws a 404. If this is not a bug, how can I fix this to work on every view of the application or the view that contains my component to say the least?
What I needed to do was to set the app base path in shared.chtml and Boom! Problem Solved.

Sending some data through Link component in React

Is it possible to send data through Component in react js.
I have a react component: On load of this component I have an api call and get a response, on this component I have this
Go to Next Page
On this Next page load I need some data from response of my previous component - how do I send it? is there a way to do this in react?
If you are using any kind of state management framework such as redux or flux, you can set the data in the store once the api call is fullfilled (on your first page, ie the one with the Go to next page link). Now on the next Page, you will have the data you need in the store which you can retrieve and do whatever you want with.

How to reload a page on change in server database

I'm using tastypie + django + backbone.js . My application should be usable by more than one user at a time.
What I want to do is to show all users "live" changes on the database without having the users manually reloading the page.
Anyone around to point me in the right direction?
Thanks
To get this working in all major browsers you will have to periodically send an AJAX request to your server asking if any changes have occured.
In modern browsers you could make use ob web sockets to setup a PUSH service where the server can push those changes to your application or simply notify you about it.
(If you are using Backbone as an MVC framework anyway you might as well step back from the idea of reloading the page and just request your data using AJAX and use Backbone's View component to render your data into HTML elements)

Resources