Three takeaways from React Amsterdam 2017
How do you change your engine mid-flight? What do we need to get a silky smooth framerate with React native? And how do you prevent people from throwing up when using your web VR app? We — three tech leads from Fabrique — attended the React Amsterdam conference on Friday 21 April and discovered the answers to these and many more questions. These are our picks from the conference.
Pinterest: moving to React
Server side rendering was a strict requirement, for SEO and sharing reasons among others.
Interesting to see though that the server still runs Django for many other parts, since Django has long been our framework of choice.
Silky smooth framerate with React native
We’ve all fiddled around with some framework to create ‘native’ phone apps based on one single code base. Phonegap and Appcelerator Titanium are some of the more known ones and these have existed since 2009. Our experience is that none of these ever tackled the single major issue when using web technology to create native apps; performance. It’s for this reason that when we first heard about React native we were not super enthusiastic. Tal Kol from Wix had a very nice talk about this ‘problem’.
React does have it’s limits however and eventually will get really slow if you have a complex app. Acknowledging this is key, and the solution is as simple as it is elegant. Native code. Tal showed how a simple ‘scroll’ handler can kill performance really fast, and how a little bit of native code can solve this in a heartbeat.
When you think about this, it seems React native is definitely the way to go when you want to build an app using web based technology. Sure some native code is almost unavoidable, but that is really only the case when you want high performance in your app. The majority of screens in your app won’t need this and you can create those really fast using technology you use every day. We can’t wait to give it a try and see for ourselves!
Step into the future with React VR
One of the joys at our offices the last couple of months is to fiddle around with anything related to VR. Unfortunately nothing made it to production yet (!) but that doesn’t detract from the fun we have creating it. The technologies we’ve used until today are Unity and some high level AR / VR frameworks like Vuforia. We also had a quick look at WebVR which, in short, is a standard to bring VR to the web browser. In our opinion it still has it’s shortcomings in terms of browser adoption and performance. But on the the other hand: it has a lot of potential. It uses open technologies and unleashes the raw power of WebGL within a virtual environment.
To make the WebVR world an easier and prettier place, there is a React Library available, surprisingly named React VR, and created by the guys from Facebook.
Nik Graf from the Austrian company Serverless gives a talk about this topic. The first part of the talk is about the technology behind VR in general. After that, Nik zooms in on the role of WebVR and React VR in particular. Nik uses the novel ‘The Hitchhiker’s Guide to the Galaxy’ as an analogy to make the story more lighthearted and digestible. From a technical perspective, Nik explains the possibilities of the library really well. Especially the declarative nature of React makes it easy to setup and a maintain a VR environment within the browser. And the way the technology goes hand in hand with modelling tools like Blender is quite impressive.
For our next WebVR project, we’ll definitely use the power of React VR.
In short: a must see.
Interesting bits and bobs
There were too many interesting things to list them all. You can watch the videos online, like this one where Max Stoiber explains how he’s handled styling inside React, or this one where Alex Castillo from Netflix talks about Redux error handling middleware that catch bugs in production before your users do. Finally, in this one, Michel Weststrate from Mendix explains why using MobX (or Flux or Redux for that matter) to separate state and components is a good idea, inspired by Caesar and Napoleon’s divide and conquer strategy.
We left inspired and enthusiastic. Our understanding of React has deepened, and seeing so many developers sharing the same views about React, and seeing that companies big and small are taking the leap and (re)writing their applications in React, leads us to believe this is a solid and futureproof choice. If your application is indeed reactive, that is.
Thanks to my colleagues Mark Dibbets and Robin van der Rijst for their cooperation in writing this article. By the way: do you want to become my colleague too? Check our developer vacancies (sorry, only in Dutch): https://www.fabrique.nl/vacatures/