React.js Extension for Yii 2 ¶
React.js and JSXTransformer.js Assets
The preferred way to install this extension is through composer.
Add to the require section of your
And run in terminal
If you see the following error message:
Your requirements could not be resolved to an installable set of packages.
Change in the
And add ~~~ "prefer-stable": true, ~~~
Add to assets/AppAsset.php file:
'opw\react\JSXTransformerAsset', // optional 'opw\react\ReactAsset'
For don't use JSXTransformer, use react-tools and add your JSX compiled files in AppAsset.php:
public $js = [ 'build/HelloWorld.js' ];
Further Information ¶
Please, check the React.js site documentation for further information about its configuration options.
Web & Mobile development