What is the difference between the following methods of defining a react component?
Is the second method simply a shorter way of writing the same code? Will they both run and render exactly the same thing?
import React from 'react'
function MyApp() {
return (
<h1>
Hello, World!
</h1>
)
}
export default MyApp
import React from 'react'
export default function MyApp() {
return (
<h1>
Hello, World!
</h1>
)
}