Skip to content

defyma/yii2-react-basic

Repository files navigation

Yii2-react-basic Template

Yii2 as backend service API (ajax), and react as view in yii2 in 1 bundle + use native php/yii2 navigation

  • JSX file dir in "@app/react/{following with controller and action dir}"
  • Develompent Build in "@app/chunk"
  • Build file dir in "@web/build"

How to:

Using composer ceate project:

composer create-project defyma/yii2-react-basic <folder>

then: 
$ cd <folder> 
$ npm install
$ npm start

Manual:

  1. clone this repo
  2. composer install
  3. npm install
  4. npm start

For Build Prod

npm run build

FYI

This template use native php/yii2 navigation 1 view = 1 react-dom, if you expert on react you can custom with react-router, redux, etc..