Sciptio react native


#1

Hi !
I was requested to build React Native app for a client that uses Scipio widgets for web.
I was wondered how I can use it, nor if i can simply load the forms into webview and in that case, how ?
do you have an example for it? id glad to get more details…


#2

Hi elirang,

I can’t really say much because I haven’t worked with React so far. Perhaps Paul can give you a better insight, so I’d wait for his input.

In the meantime, you can check out our angular addon (https://github.com/ilscipio/addons-angular-shop) which may give you an idea of how it can be done.


#3

Hey there Eli,

and welcome to the community.

So here’s the deal with using React/Angular/Vue with something like ScipioERP: Out of the box ScipioERP uses server-side rendering for all its screens. Meaning that when you make a request, the application processes the request, renders and sends it back to the browser. All native apps are build like this.

Usually you’d want to work with Angular,Vue or React in an entirely different way, whereas you define your application in one of those scripting languages and build with your own build-tools (npm, bower and alike). The user loads the JS application, and then most of the interaction happens client-side, with Ajax requests going back to the server ever so often.

That’s important, as it essentially means that you end up redefining your own html in your own templates and do not use the Scipio ERP templating toolkit (widgets, FTLs etc) for any of it. So if you want to use those languages in the way they are meant to be used, you should only use Scipio ERP for processing data and returning JSON objects, which you can then use to rebuild the screens inside of your own custom application.

Alternatively, you can also use Ajax to make a request against Scipio ERP and have it render a portion of a screens. There is a hidden option in our enterprise theme “Ignite Admin” which, once enabled, will fetch a section of a request and render that to screen, instead of redrawing everything. It works well, but again: it isn’t how those technologies are supposed to be used.

If you want to have a proper example on how to use ScipioERP for something like React/Angular/Vue, then the Angular Addon @minifreak posted is a good example. It comes with a custom controller, that shows how you can call services/events on the scipio side and use them inside of angular.