Welcome Guest, Not a member yet? Register   Sign In
Codeigniter and ReactJS
#1

(This post was last modified: 02-20-2023, 05:20 AM by kenjis. Edit Reason: Remove BB tags )

For my new project, I want to use Codeigniter and ReactJS. What's the best way to set up the project directories and convert .jsx files to .js? How can I concatenate and minify all .js files to be min.js? Should I use GruntJS?
Reply
#2

I find the simplest way to get started with something like React is probably using ParcelJS to handle your javascript dependencies and building the files, etc.
Reply
#3

Setting up a Codeigniter and ReactJS project can be done by creating separate directories for the frontend and backend. You can have a "frontend" directory for all your ReactJS code, and a "backend" directory for your Codeigniter code. To convert .jsx files to .js, you can use a build tool like Webpack or Babel. These tools can also help you concatenate and minify all .js files into one minified file. GruntJS can also be used for this purpose, but Webpack or Babel are more commonly used for ReactJS projects.

To get started, you can create a basic ReactJS project using Create React App, and then integrate it with Codeigniter. You can then use Webpack or Babel to build your ReactJS files into a bundle that can be used in your Codeigniter views.
Reply
#4

Thank you for sharing the steps to set up a Codeigniter and ReactJS project. I have a couple of questions:

Are there any specific steps required to integrate ReactJS with Codeigniter, or is it just a matter of creating separate directories for the frontend and backend?
Can you recommend any resources or tutorials that provide a more detailed guide on how to set up this type of project?
Thanks again for your help!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB