How to install React Js with CodeIgniter..? How to install React Js with CodeIgniter..? codeigniter codeigniter

How to install React Js with CodeIgniter..?


CodeIgniter with React

CodeIgniter code is little bit changed to accommodate theming structure. Also there are significant changes done and some are in progress, to support rendering using React JS.

The changes are done in such a way, which put this repository in the state, in which it can be used in multiple ways, the default being rendering the views using React and it supports the default CodeIgniter views also.

Here you can find much more infos : https://github.com/kala725/CodeIgniter-with-React

Second one

Another example which I tried two years ago I think : https://github.com/Jineshfrancisco/React_Vue_Frontend_Scaffolding

  1. download the repository from github

  2. extract into your codeigniter project folder

  3. link css and js files in public folder into your view file

  4. edit the package.json file and other (watch the Video)

  5. run the command "npm run watch" or "npm run prod"

video tutorial explains almost all you need on youtube : https://www.youtube.com/watch?v=-ba6y3r69VE

Codeigniter + Reactjs – Integration

See this tutorial is well for step by step https://www.tutofox.com/react/codeigniter-reactjs-integracion/


I am using React+ CodeIgniter for a small personal project I am working on currently. React is wonderful for creating dynamic, interactive front-ends. PHP developers are available in plenty to develop the REST backend, with the added advantage of very cheap, shared hosting. Some simple "formsy" admin pages are also done in CodeIgniter, making my bundle size smaller and maybe some added security.

You need to first build the create-react-app project using

npm run build

When it finishes, you will find the 'index.html' and other required files inside the "project_folder/build" folder. Copy everything into the Apache htdocs folder. I put the codeigniter files into "htdocs/api" folder. You will need to do some redirects with '.htaccess'.