Hacker News new | ask | show | jobs
by mercurial 3027 days ago
Works fine in React.
1 comments

That's because HTML as a framework doesn't have a proper inheritable component model. It's all runtime hacks on top of a document model that is composed of divs, spans, and inputs.

IOS, Android and any sane application environment have a fully extensible layout and component model to define at compile time.

Android and iOS don't really have this to the same level actually.

Say for example on Android I wanted to include a layout but change the text color of all the items in that layout - I can't just do <include text_color="purple">. But I can do pretty much exactly that with React. This is because you can't use variables within layouts like that on Android. Sure, I could build a custom view and add a custom attribute and use that - but this is one of the areas where native isn't as nice as React Native (there are plenty of pain points with RN though).

You could do that with themes.