3 ms·
I'd much rather be writing apps using constraint-based layout, much like AutoLayout. It took me a while to grok it, but it's much simpler once you get it.
by thramp 12y ago
I'd much rather be writing apps using constraint-based layout, much like AutoLayout. It took me a while to grok it, but it's much simpler once you get it.
- PSeitz 12y agoI agree, imho there isn't any decalarative and powerful way to build UIs as AutoLayout.
- DennisP 12y agoIt's even available in javascript: http://gridstylesheets.org/ http://gridstylesheets.org/
- thramp 12y agoI saw that, but using polyfills for layout give me pause.
- acdlite 12y agoI disagree, but I suppose this a matter of preference. For whatever it's worth, the React team did explore using a constraint-solver, but nixed the idea. They explain their reasoning here: https://www.youtube.com/watch?v=7rDsRXj9-cU&t=14m20s https://www.youtube.com/watch?v=7rDsRXj9-cU&t=14m20s
- thramp 12y agoYeah, it is preference. I found that buying entirely into Autolayout + Storyboards makes for a really nice development experience. And their reasoning makes sense. I totally get why they would avoid constraint-based layout.
- cageface 12y agoNot sure what I think about React Native as a whole but I wholeheartedly approve of using flexbox for layout. It's much more declarative and easier to understand. Autolayout is a fundamentally flawed approach to layout. Building layouts in AL is very tricky and debugging them is twice as tricky as writing them. And lord help you if you have to programmatically add or remove views from a layout at runtime.
- thramp 12y ago> And lord help you if you have to programmatically add or remove views from a layout at runtime. I disagree with the rest, but yeah... that's a sore point.