What else is there? There is a library called ReactStrictDOM, which we should definitely mention. This was open sourced by Matter a few months ago, and it was actually a really, really interesting concept into what could be possible. Everything I show you here is kind of like very experimental, very early days. Don't be afraid of what you see next. This is the idea of ReactStrictDOM, which means we have a separation here between ReactStrictDOM native on the left and web on the right. But we would kind of write the same code, and we just get, well, displayed differently on these platforms.
Let me give you a clear example, because explaining this might take a bit too long today. This is how it could look in reality. We're importing these HTML elements or the div element from the ReactStrictDOM library, and then use it like this. We could also have our own stuff like an example block or combine it with some other elements like a scroll view. This might look a bit terrible to you, and I agree that it's probably not the best way, because no template, no code snippet that you're going to find on the internet will work if you do it like this. But as I said, it's really early days for stuff like this. And just seeing that it could be possible is super interesting, because if you build this app, which works, this is not a theory. This is actual code that I tried in a video as well. If you build this, you can build a website from this, which shows the usual div tags, the usual span or p tags. But if you deploy it as a native application to your device, it is actually rendering React native views. It is using the UI view, the UI label on iOS and the according elements on Android. So it's not rendering, it's not doing the thing that Capacitor or Ionic is doing. It is actually, from HTML code, rendering to native elements, which is completely mind blowing, just like a glimpse into the future.
Then, besides that, we of course have to mention React server components, and we just have to say that, yes, this is also possible for React native, especially Shiman Ripshak has done a great job of showing different cases of using React server components. It is still, again, very early days, but it should be possible later this year to use React server components with React native. Once again, this is kind of blowing my mind in what's possible in that we are loading native applications, then bring in the server components, but this could be unbelievable beneficial for many, many applications. So all of this just brings me to the point that we have really, really exciting times ahead of us. The first thing that I've shown you so far in this talk is definitely a possibility, and it's happening right now. It's not like we're dreaming about something that might or might not happen at some point in the future. So to be very clear, Expo Router v4 is right around the corner. It's probably already released, maybe in beta, maybe in stable, and after version four, as I've talked with Evan Bacon, we're going to see a rebranding, renaming around Expo Router, and then it's becoming more the standard for Expo applications. So this is definitely here to stay. Then we got React server components, which is already taking place a lot in Next.js, but this is also coming to React native. As I've seen, or as we've seen with the examples from Shiman, there's a lot going on.
Comments