Render a single React Component
dbrxnds opened this issue · comments
Description
We come from a Symfony Encore background, where someone had set it up to allow us to register React component using react-on-rails and then render a single react component somewhere in our application using https://symfony.com/bundles/ux-react/current/index.html
Is this possible with Symfony & Vite? If so, do you so happen to have an example of this?
Example
No response
hi @dbrxnds, yes you can do this,
check the doc : https://symfony-vite.pentatrion.com/stimulus/symfony-ux.html#symfony-ux-react
you can find a full example in the stimulus playground:
https://github.com/lhapaipai/symfony-vite-dev/tree/main/playground/stimulus
Hi @lhapaipai thanks so much for the quick response! I must have read over that part of the docs, my bad!
Additional question, we are on php 7.3 and symfony 3.4. does the vite bundle really require those higher versions or can we fork and remove the requirements to make it work for us?
I'm sorry, yes you need php8 because the bundle use PHP attributes...
it seems to me that it is since version 6.3.4 (no major version change) we noticed that the bundle was already using code not compatible with php < 8
#82