4 ms·
Not the loop. JSX way of declaring UI structure.
by hesarenu 9y ago
Not the loop. JSX way of declaring UI structure.
- polskibus 9y agoDo you mean like XAML and WPF ? https://msdn.microsoft.com/pl-pl/library/ms752059(v=vs.110).aspx https://msdn.microsoft.com/pl-pl/library/ms752059(v=vs.110)....
- hesarenu 9y agoI suppose so. But i do like reactjs declarative style rather code behind. Something which Flutter does as well.
- mlsarecmg 9y agoXAML is a template, it hooks into a controller via bindings. You could compare it to Angular maybe. In React a view is a function of state: const Header = ({ color, children }) => <h1 style={{ color }}>{children}</h1> // Gets transpiled into: const Header = ({ color, children }) => createElement('h1', { style: { color } }, children) <Header color="red">hello</Header> A large part of my career was about XAML/WPF/SL. I know it took me a year or more to really understand it deeply, being able to extend and do everything i wanted. I came to the same state 60 minutes into React. The pattern behind it does make many things easier. And that is an understatement. I believe that's also the main reason Microsoft itself is betting on React for cross platform and native apps as well as extension eco systems: https://github.com/Microsoft/react-native-windows https://github.com/Microsoft/react-native-windows https://github.com/Microsoft/reactxp https://github.com/Microsoft/reactxp https://developer.microsoft.com/en-us/fabric https://developer.microsoft.com/en-us/fabric