Closed mkotsbak closed 8 years ago
@mkotsbak can you send a PR ?
by any chance if you know javascript send a PR here https://github.com/facebook/react-native/issues/4380 :D , it will make our life easier :)
mkotsbak - I don't see the need for functional component in Scala. What do you gain over just using a function like this: https://github.com/mkotsbak/Javabin-SriReactNativeDemo/blob/master/mobile/src/main/scala/sri/templates/crossplatform/mobile/AlcoMeter.scala#L26-L30 I see maybe in JS you get types and default values, but that is not needed in Sri, as you have both types, default values and named parameters: See also https://news.ycombinator.com/item?id=10348391
well above issue is not about scala functions vs functional components , while registering if they allow functional components we can pass functions instead of React.createClass with render/React.Component with render boilerplates as mobile root.
coming to scala methods vs functional components from HN link you posted u missed main important point
in the future, shouldComponentUpdate (or built-in memoization strategy?), you can potentially later change it to be stateful without rewriting consuming code, etc
if you're just using methods then your component will go bigger and bigger and on state updates react has to diff whole tree ..
Ah ok, yes, maybe it is able to optimize on stateless components that has not changed any input properties?
But how is this different from pure JS React native? Doesn't they also need to run the AppRegistry function?
But how is this different from pure JS React native? Doesn't they also need to run the AppRegistry function?
sorry didn't understand, can you elaborate ...
Why did you close it? Is it fixed?
Why did you close it? Is it fixed?
I don't know how other open source projects work but i don't entertain these kind of behaviours in my project.you don't have time to answer my first question/send a two lines of simplePR but you have time to argue on some other unrelated things!. Sorry to be the bad guy In future also i'll do the same thing if its repeated again ,if you don't like it then don't use this project.
I still don't know if the comment #19 (comment) is related to this issue or just piggybacked on it
i already explained that here.
Replace js.Function, jsArray etc. with actual types.
The types are given here: https://github.com/facebook/react-native/blob/master/Libraries/ReactNative/AppRegistry.js or in the doc: https://facebook.github.io/react-native/docs/appregistry.html