Based on a reference:
Arrows are a function shorthand using the
=>
syntax.
Well I cannot understand it as well. How can I write following code by using function
in it literally?
AppRegistry.registerComponent('Component2', () => Component2);
Ok, lets focus on this:
() => Component2
- What's
()
? Is it the value I want to pass? - What's
=>
? Is it a alternative for the word offunction
? So we can write it as() function Component2
? (I hardly think so) - What's
Componenet2
? Is it the name of a function? Or a class? or what exactly?