Installed react-bundle following the steps in the installation process - but when trying to use react_component in Twig - the Symfony error "Unknown "react_component" function." is thrown
Basic code below.
Body in twig file
{{ react_component('TestApp' }}
app.js
``import ReactOnRails from 'react-on-rails';
import TestApp from '../src/JS/Components/Test';
ReactOnRails.register({ TestApp });``
TestApp
`const Test = () => {
console.log('Rendering Test');
return
react-bundle: 5.1 symfony: 5.3.16
Installed react-bundle following the steps in the installation process - but when trying to use
react_component
in Twig - the Symfony error "Unknown "react_component" function." is thrownBasic code below.
Body in twig file
{{ react_component('TestApp' }}
app.js ``import ReactOnRails from 'react-on-rails'; import TestApp from '../src/JS/Components/Test';
ReactOnRails.register({ TestApp });``
TestApp `const Test = () => { console.log('Rendering Test'); return
export default Test;`