![]() Seems like people are saying that you can’t. But I was wondering if I could do the opposite, have the page managed by the react component and have a modal managed by liveView. I’ve found a package that allows me to drop in react components into liveView I assume it tells LiveView not to send updates to that piece of code. LiveView provides the best solution for this I’ve ever seen because - there is no demarcation from backend to front end validation logic. The charts are based on models and criterias defined through admin interface and some chart parameters are configurable in live view. It’s an old package but simple, and it still works with elixir 1.9 and phoenix 1.5Īs for not needing liveView the issue is that React with forms and keeping validation in sync, sucks. You could switch them, and transform your Django backend into a Phoenix backendĭefinitely something I’ve done a spike on, it’s kind of neat - I found this terraform (not the hashicorp thing) that will server whatever endpoints we have in phoenix, but pass the rest to a predefined backend (my case my django one). Probably most of the people here are backend related, but there are some advantage to have a separate frontend, and You have one. Is there any way you can break out one page at a time from the React app or is it all one big SPA? Navigator that marks as active the page where you are (Header of this page). You will be able to find typical solutions when creating a dynamic web page using the HTML over WebSockets approach. You could use also just use Phoenix to provide a “real-time API” using Channels - this is the same backend comms tech that LiveView is built on but doesn’t do any DOM mutation for you so you would do that in React. Welcome to Django LiveView, the Django framework for creating a complete HTML over the Wire site or LiveView. I don’t have any React specific experience, but I don’t think that will stop you from hosting a React component on a LiveView page provided you mark which bits of the DOM React is allowed to mess with using phx-update="ignore" as per The pages hosting LiveView will need to be fully “Phoenixed”. If you can get clear demarcation you may have a chance, but if you want React to pull in bits of LiveView I think you will really struggle (without resorting to something ugly like iframes). LiveView strips away layers of abstraction, because it solves both the client and server in a single abstraction. LiveView works with the backing of server-rendered HTML and provides a. This is a post about how we created LiveView, our flagship feature. It will cover frameworks like Django, Flask, Spring, ExpressJS, Laravel. If ( main issue you will face is both React and LiveView fighting for control over the DOM. Phoenix provides features out-of-the-box that are difficult in other languages and frameworks. Var canvas = document.getElementById('canvas') Ĭonst video = document.querySelector("#videoElement") Installing DjangoĪfter having Python installed on your Windows machine, install Django package by using the following command: Starting new Django project Installing Python on Windowsĭjango is a python framework, thus Python is required to be installed, to install Python on windows follow the instructions in this link (the recommended version is Python3.7 or later). ![]() 0 425 0.0 Python Build reactive applications with the django tooling you already know and love. ![]() Windows Machine for the local development(Windows 10 machine is used in writing this blog). Phoenix LiveView but for Django Project mention: Launch HN: Pynecone (YC W23) Web Apps in Pure Python.Remote Linux server (the used one in this blog is Ubuntu Server 20.04 LTS (HVM) provided by AWS).This blog shows how to access client’s Webcam and how to send live streaming images to Django server using Python and JavaScript. Hi everyone, this is Mohamed Alomar from GeekFeed. ![]()
0 Comments
Leave a Reply. |