Gradually Introducing Phoenix LiveView into an Existing React Single-Page Application

212
clicks
Gradually Introducing Phoenix LiveView into an Existing React Single-Page Application
Aphova brings up a common challenge faced by many developers in maintaining and extending features in a React SPA and expresses an interest in the Phoenix LiveView for a more streamlined development experience. The proposal is to gradually incorporate LiveView by sectioning off specific frontend routes like `/profile/*` to be served by LiveView as a proof of concept before expanding to other parts of the application. Aphova suggests this setup would maintain a consistent navbar and style while switching between React and Phoenix based on the route. The integration aims to utilize the same authentication cookie without resorting to reverse proxies or subdomains. The post seeks advice on the feasibility of such an integration and Aphova is open to minor imperfections as long as the functionality remains intact. One comment by a user named 'tzigane' confirms the possibility of implementing LiveView on a route-by-route basis and mentions the potential of rendering React components within a LiveView-driven page as an alternative approach.

© HashMerge 2024