React starter repo with Symfony 4 and Webpack Encore
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets Add react components Jan 14, 2018
bin composer create-project symfony/skeleton my-project Dec 20, 2017
config composer require asset && composer require --dev server Jan 14, 2018
public composer create-project symfony/skeleton my-project Dec 20, 2017
src Add dummy endpoint and data Jan 14, 2018
templates Add trailing slashes Jan 14, 2018
.env.dist
.gitignore composer require asset && composer require --dev server Jan 14, 2018
README.md Add usage to readme Jan 22, 2018
composer.json composer require asset && composer require --dev server Jan 14, 2018
composer.lock composer require asset && composer require --dev server Jan 14, 2018
final-result.png Add usage to readme Jan 22, 2018
package.json Add material-ui Jan 14, 2018
symfony.lock composer require asset && composer require --dev server Jan 14, 2018
webpack.config.js Add header and footer and base css Jan 14, 2018
yarn.lock Add material-ui Jan 14, 2018

README.md

React starter repo with Symfony 4 and Webpack Encore

This is a Symfony 4 starter repo with React, developed for https://www.modernjsforphpdevs.com/react-symfony-4-starter-repo/

Requirements

Installation

Install the composer dependencies:

$ composer install

Then install the node dependencies:

$ yarn

# OR

$ npm install

Usage

Build the assets with Webpack Encore

$ yarn run encore dev
# yarn run encore dev --watch to automatically rebuild on every change

And start the built-in webserver

$ ./bin/console server:start
# stop it again with ./bin/console server:stop

Navigate to http://localhost:8000 to see the final result, which should look something like this:

The final result is three Material Design cards with an author, title and content