Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gatsby): Improve dev 404 page #31332

Merged
merged 1 commit into from
May 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,20 @@ class Dev404Page extends React.Component {
Create a React.js component like the following in your site
directory at
{` `}"<code>{newFilePath}</code>"{` `}
and this page will automatically refresh to show the new page
component you created.
and then refresh to show the new page component you created.
</p>
<pre>
<pre
style={{
border: `1px solid lightgray`,
padding: `8px`,
maxWidth: `80ch`,
background: `#f3f3f3`,
}}
>
<code
dangerouslySetInnerHTML={{
__html: `
__html: `import * as React from "react"

export default function Component () {
return "Hello world"
}`,
Expand All @@ -163,7 +170,14 @@ export default function Component () {
{` `}"<code>{newAPIPath}</code>"{` `}
and refresh to execute the new API function you created.
</p>
<pre>
<pre
style={{
border: `1px solid lightgray`,
padding: `8px`,
maxWidth: `80ch`,
background: `#f3f3f3`,
}}
>
<code
dangerouslySetInnerHTML={{
__html: `
Expand Down