tiagfernandes / symfony-react-starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting started With React in Symfony Using Webpack Encore

react-symfony

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:

sym-starter-768x446

Link to tutorial

Here

Getting Started

Clone the repository

$ git clone https://github.com/yemiwebby/symfony-react-starter.git

Change directory

$ cd symfony-react-starter

Use composer to manage and install dependencies

$ composer install

Install the frontend dependencies

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.

Start the application

Backend

$ php bin/console server:run

Frontend

 $ yarn run encore dev --watch

Prerequisites

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.

Built With

  • 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.

About


Languages

Language:PHP 67.0%Language:JavaScript 25.1%Language:HTML 7.9%