montessori-ressources / web

Montessori Ressources full stack webapp based on PHP Symfony
MIT License
2 stars 0 forks source link

Integrate ReactJS as frontend development method #73

Closed julbrs closed 4 years ago

julbrs commented 4 years ago

Read the doc in docs/dev.md

There is now 2 console to run in order to develop with reactJS on this project:

There is a react app already developed in the project:

{% block body %}
Below here is a React App:
{# The ReactJS container #}
<div id="root"></div>

{% endblock %}

{% block javascripts %}
{# Load the React app from app.js file #}
{{ encore_entry_script_tags('app') }}
{% endblock %}

Test the app in the Contact page (under More)

2019-10-05 21 36 34

(yeah I know it is a really simple app. but we can imagine consume any data from the Entities for example)

We can :

It allow to do react when and where we want. It allow to migrate part by part the existing webapp to react if we want to go to a single react app / single page application.

StaudenmannM commented 4 years ago

Hi, I don't really see the link between react app and Symfony in this example... how are we supposed to consume entity from the react app? Other minor comment, I think npm is easier to use in React project :)

analuspi commented 4 years ago

I don't know if npm is easier, but I always used yarn... :)

analuspi commented 4 years ago

I have some doubts in this too @StaudenmannM...

how are we supposed to consume entity from the react app

Are we going to do an AJAX requisition?

julbrs commented 4 years ago

I don't know if npm is easier, but I always used yarn... :)

me too :D

https://www.reddit.com/r/reactjs/comments/9ypfd8/why_does_createreactapp_use_yarn/

We can switch to npm !

julbrs commented 4 years ago

@StaudenmannM @analuspi can we meet for that I will show you !