This is a Symfony - React starter built with Symfony and React, then powered by Webpack Encore. See the screenshot of what we will build below:
$ git clone https://github.com/yemiwebby/symfony-react-starter.git
$ cd symfony-react-starter
$ composer install
Run the command below from the project's root directory in another terminal:
$ yarn install
Do ensure that you have two separate terminals opened on your machine. One of them will be used to start the Symfony app while the other will keep the frontend running.
$ php bin/console server:run
$ yarn run encore dev --watch
A basic knowledge of React and Object oriented programming with PHP will help you get the best out of this article. Do ensure that you have Node.js and Yarn package manager installed on your system.
- Symfony - Is a set of reusable PHP components
- React - A JavaScript library for building user interfaces.
- Webpack Encore - Webpack Encore is a simpler way to integrate Webpack into your application.