Skip to content
Discussion options

You must be logged in to vote

Your Page Component page should be Page and this is jsx format convention.
It is because React uses createElement by the name of your component, and if you name your component page, jsx will read it as <page /> and in which the jsx will understand it as an HTML format.

<component /> compiles to React.createElement('component') (html tag)
<Component /> compiles to React.createElement(Component)
<obj.component /> compiles to React.createElement(obj.component)

This is why you need to use Uppercase to the naming of the React Component.

Example:

// ...

export default function Page() {

// ... rest of the code

Reference

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mftaa
Comment options

@mftaa
Comment options

@devjiwonchoi
Comment options

@AbdullahAA7
Comment options

Answer selected by mftaa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants