Welcome Guest, Not a member yet? Register   Sign In
Anyone using CI with React,Vue,Svelte or Marko?

(This post was last modified: 03-05-2020, 04:58 PM by tweenietomatoes.)

I am just wondering if there are any people out there who's using CI with JS frameworks rather than traditional web apps?

Is it easy to integrate?

you can just use api from CI and build your js framework seperately

I did a couple of tries with VueJs -> nothing spectacular, it just works.

Here is good advice on Ajax calls setup for reactive frontend frameworks:

And when you will be building your backend, you should ensure that you follow some basic architectural principles and constrains. For example, you should split all communication between FE and BE into small requests, serve each piece as JSON from dedicated controller/method, and gracefully process errors. Those pages in user guide will help you to start:

Then basically all what you have to do if you are building VueJs SPA is to serve your layout that initializes VueJs, and let javascript do the rest. CI4 will not be envolved more then responding to Ajax requests coming to API methods you defined.

I use Vue with codeigniter 3.

My codeigniter app is just a json backend at this point. Having a json backend that's not coupled with the front end makes it easier to port applications too (I'm currently converting my CI app to Laravel).
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!

Actually if i would use a fullstack or almost fullstack framework/toolkit like CI, ~especially in PHP where we can easly integrate into front end code at server-side(they're trying to advert JS as only logical thing to use in front end and lastly asp.net's blazor)~, i would not want to waste my time trying to handle JWT to auth user instead of using server-side sessions. I am not familiar with SPA user auth. Is there any recommendations?

I am thinking to use JWT in SPA and keep user token with cookie-js to persist it.
pro novice

We use CI with ReactJS for an application that is a SaaS for 1700 locations with thousands of concurrent users (all day long too) - we handle a boat load of POS transactions, appointments, services, etc all through the app, largely using ReactJS front end.

So, yes, it can do it very well.

Theme © iAndrew 2016 - Forum software by © MyBB