I understand your set-up. I don’t have experience in getting such a set-up to work though.
I have made a basic search and found some information on stackoverflow:
The link includes some futher links on the subject and you can try to go on from there and figure things out.
However, from the first glance it seems to me that if you’re using React.js as frontend for a Codeigniter app, you should not have to make ajax requests to fetch data.
If you had created two separate projects, one for the frontend with React.js and one for the Codeigniter backend, you would have to make fetch requests for sure, serving data from the Codeigniter as from a database.
As I say, I don’t have experience with that. You might actually consider an easier set-up with node.js and backend at firebase or comparable. There is much more useful resources for a beginner with that set-up out there.
Good luck anyways.