4 ms·
Absolutely. My primary concern is with the controls feeling native. Reimplementing controls with UIViews doesn't seem much better than reimplementing them with
by TheMakeA 12y ago
Absolutely. My primary concern is with the controls feeling native. Reimplementing controls with UIViews doesn't seem much better than reimplementing them with HTML/CSS (save for performance). There's still surface area to break the illusion.
Some food for thought: what if you kept HTML and CSS but instead of using a WebView to render it, you rendered the DOM manually using UIViews? You could even make overflow: scroll; turn into UIScrollViews automatically.
- ErikHuisman 12y agoIf you write JSX. What would be the benefit of using html anymore? Your own components can be the same on web or native. The base components might be a bit different but that isn't difficult to learn. <Carrousel> <Item></Item> <Item></Item> </Carrousel> On the web you might use a div with overflow:scroll on native a scrollView.
- kylebrown 12y agoOne of the big pieces in React Native was reimplementing flexbox positioning (they did it using randomly generated test cases in a TDD-based process; described in the "diving deeper" video iirc). So as long as you use flexbox to position your html, it should be pretty portable to react native.
- pikachu_is_cool 12y agoI mean... if you're talking about the entire HTML and CSS spec, then it'd be way, way, way ridiculously slower than just using a WebView.
- kylebrown 12y ago>Reimplementing controls with UIViews If it's using UIViews, it isn't reimplementing native controls. It's using native controls, same as if it was implemented with (interface builder) .nib files. That's like saying "reimplementing html/css with html/css".
- smackfu 12y agoIt may be a "native control" but if you reimplement UIBUtton and have to recreate what Apple did to create it in the first place, that's where things tend to fall apart.