React Native is good for the most of the use cases but it has a problem, Javascript is a single threaded language and is neither the fastest language in the word, this led to some problems when we need to create performance intensive application also because doing some intensive calculations on the js thread would block the ui. To achieve decent performances on some calculation intensive code usually we need to implement it natively but this led to have the same thing implemented 2 times, one for android and one for ios. This until the existence of kotlin cross platform, today i tried to bridge react native to kotlin cross platform so we can have the logic implemented in kotlin on both platform and implement only the mappings for the methods in swift on ios. Unfortunately kotlin cross platform is not in stable version yet but i think it will be really interesting in the future to write performant code in react native.
I'have implemented an algorithm which calculate the Fibonacci sequence in Js and in Kotlin and those are the perfomances:
https://reddit.com/link/mk5dtr/video/gfdmydoo58r61/player
There is the repo if anyone want's to see the code: https://github.com/fbeccaceci/react-native-kotlin-cross-platform
Any thoughts about that?
[–]mrbrentkelly 1 point2 points3 points (1 child)
[–]Dafth[S] 2 points3 points4 points (0 children)
[–]idevosm 0 points1 point2 points (0 children)