![](https://lemmy.max-p.me/pictrs/image/d3667ced-4ea5-4fbf-b229-461c68192570.jpeg)
![](https://programming.dev/pictrs/image/8140dda6-9512-4297-ac17-d303638c90a6.png)
I’m not saying to use native toolkits like Qt or GTK, those indeed have problems. What React Native does is somewhere in-between: it’s an abstraction that produces decent results between platforms including the web.
It uses slightly higher level abstractions that work a lot like the web for rendering, you still get your boxes and a subset of CSS properties. But on web it’ll compile to flexbox or grids, on Android it’ll compile to something like a LinearLayout or some other kind of layout the OS understands. On web a <Text>
will compile to a <span>
, on Android it’ll compile to a native text element. On mobile where you need the performance the most, you otherwise end up rendering a web page that will then eventually end up doing the same thing back to display it natively, but with all the downsides of a web view.
This performs way better with basically no downside for the web version, has the majority of the flexibility one needs for responsive layouts but it’s way more lightweight when you do target native. On native you can just render it all yourself for really cheap, like any native toolkit would. You’re your own toolkit.
They will never look native, but at least all the rendering will be native. Most companies have their custom UI theme anyway, native widgets rarely gets used anyway.
We’re talking Electron replacement after all, it’s not like apps made with it look anything native. But if at least they performed like native apps by skipping the web views and all the baggage it brings with it, that’d be great.
C’est surtout un question de se débarrasser des responsabilités si quelque chose tourne mal. Pour une entreprise, si quelque chose arrive, souvent ils peuvent simplement passer le blâme entièrement au fournisseur du logiciel pour l’erreur, alors que si c’est un logiciel libre sans garantie, c’est l’entreprise qui est responsable.
Le risque n’a rien à voir avec le logiciel mais plutôt entièrement le risque légal.
Plus coûteux au final, mais un coût fixe. Si le logiciel propriétaire te fait perdre des millions, tu as recours contre le fournisseur pour ces pertes.