I have a page in NextJS..
function MyPage({ props }) {
console.log('page')
return (<>
<MyComponent />
</>)
}
And a component...
export function MyComponent() {
console.log('component')
return (
<>
</>
);
}
When I run yarn dev and browse to http://localhost:3000
I get the following logs in both the terminal and the browser console window...
page
component
This makes 0 sense. Server pages should not render on the browser. And components should not render on the server.
So my questions are...
- What is happening here?
- How do I tell if a component/page is a server 'thing' or a dynamic component for sure? (I seem to be mistaken here)