So this is the first morning talk, so we have to dive back for a minute talking about React Native independent JavaScript. What's the origin here? And just because I never know what the room is going to be like, how many people are used to it or not, but React was a composable function encapsulation for writing HTML, but now you're writing JavaScript components. It took this idea of these components and then wrapped them up so nicely for you, and it made it feel like HTML, but every time, as most of you have done React, every time you try to set the class, you realize you can't do that because it's actually all JavaScript underneath there and class is a keyword inside JavaScript, that's why you have to say class name in React. But it could be anything in there.
And then we actually make really cool components and then we render them out. This is the original how React Native was working. You had your DOM layout rules going to yoga layout to layout for the particular host platform, and then we were able to make up these really cool things. It could have been called anything. A view could have been called a div. I think that's moving backwards in a certain degree, but it's always a view and different things. But you have in React Native, you have these higher level ideas, view, scroll view, text, text input, and then at the bottom there, I have translations to people who have only done React.
And then of course, as we all know, this is where the native comes in, right? Native, I go ahead and put a text component on there, it becomes a UI label, or a text view depending on what platform it's actually landing on. And as we all know, this is the infamous bridge system which has been the bane of some people's existence and not too many, but here you have your host or native platforms communicating via serialized strings directly into JavaScript and communicating that back. So this is what the classic idea was when we kind of started this whole thing. This was the bridge, and it was such a great idea, we were able to take JavaScript, run it through, and then get it on a particular host platform, and that was it. We were hooking up packages from npm directly to mobile apps. This is how the groundwork was laid, and then, success, React Native is working, we're all happy, nothing left to do, and we're all set, except for I was not a big fan of how the experience was at first, even though I loved React Native, there were so many headaches, and I wrote an article, please, everybody, this is such click bait, right? But it was a fantastic article and I wrote what sucks about React Native, and I went over all the things that sucked back in 2016, and it was actually, all those things are significantly solved now, but during this chaos of first connecting these two things together through that single thread of this bridge and everything else like that, we had these questions, people had questions about how do we talk to native, it wasn't understood immediately at first. People had questions about backwards compatibility for as React Native updated. People had questions about async versus sync. It was very interesting because in the React world, you weren't used to this asynchronous structure, there was no such thing as async inside React. So then you come over to React Native, and everything that goes across the bridge is async. And then people had questions about what libraries to use as we make progress along the way. So, has anybody been doing React Native since 2016? Remember the pain points? Oh, I see some pained hands. Lift! And so, also, a funny thing, I had this one part in the article, the fight of the navigator, if you remember back then. Navigation. Fortunately, people improved that significantly. But our goal was to share the wisdom. And just open source. We're an open source company. So, of course, I had this one solution.
Comments