defyma/yii2-react-basic

Yii 2 React template

2.0.0 2019-10-12 18:46 UTC

This package is auto-updated.

Last update: 2024-04-13 04:46:17 UTC


README

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