Select to view content in your preferred language

React js in WAB 2.x

1568
4
08-09-2016 09:49 AM
RafaelFernandez1
Deactivated User

Hi there,

Any feedback using React js together WAB 2.x?

I saw some posts about React & ArcGIS API, but not a word about WAB.

Maybe Robert?

Thanks,

Rafael

Tags (1)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

Rafael,

  Sorry I do not have info on using other frameworks like React. Any reason you want to use React?

0 Kudos
RafaelFernandez1
Deactivated User

Hi Robert,

I miss Angular. WAB is not working super well with Angular and React seems the perfect substitute. I am starting to code some silly examples and ... not my words but ...it gives you the ability to create your own components that you can later reuse, combine, and nest to your heart’s content. React.js calculates what changes need to be made in the DOM beforehand and updates the DOM tree accordingly. This way, React.js avoids costly DOM operations and makes updates in a very efficient manner.

I mean, the last very basic widget I did in WAB 2.0 using regular javascript had more than 1k code lines.

myWidget

Besides, if Facebook, Instagram or the New York Times are using React...probably is because it is not a such bad idea. What do you think?

Rafael

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rafael,

  OK, good points. I will have to look into React if I ever have some free time.

0 Kudos
MatejVrtich
Esri Contributor

Hi,

we use React to build widgets for WAB.

You can find our reference implementation here: GitHub - arcdata/arcgis-wab-react-redux: A dev stack for developing widgets for Web AppBuilder for A... 

It is not so clean as if you combine React with Esri JS API in a plain app, but it works for us.

In fact, the most complicated part is to mix the immutable and stateless principles of React/Redux with mutable and stateful world of mapping APIs.

Good luck.

Matej

0 Kudos