Console log props

Hello, i am struggling with finding the solution for this:

How to add a console.log statement to print out the props for my MyComponent page component?

import * as React from 'react'
import Layout from '../components/layout'

const MyComponent = () => {
  return (
    <Layout pageTitle="Super Cool Blog Posts">
      <p>My blog post contents will go here (eventually).</p>
    </Layout>
  )
}

export default MyComponent

There is a small detail in this. The file is using Gatsby’s File System Route API, {mdx.frontmatter__slug}.js in my case. It automatically adds some props into the page template component for each page.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.