Skip to content

chore(examples): add Next.js app #219

New issue

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

By clicking “No 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? No Sign in to your account

Merged
merged 1 commit into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions examples/next/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.next
13 changes: 13 additions & 0 deletions examples/next/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"html-react-parser": "../../",
"next": "^10.0.0",
"react": "^17.0.1",
"react-dom": "^17.0.1"
}
}
27 changes: 27 additions & 0 deletions examples/next/pages/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import Head from 'next/head';
import parse from 'html-react-parser';

export default function Home() {
return (
<div>
<Head>
<title>Create Next App</title>
</Head>

<main>
<h1 className="title">
{parse(`
Welcome to <a href="https://nextjs.org">Next.js</a>
and HTMLReactParser!
`)}
</h1>
</main>

<style jsx>{`
.title {
font-family: 'Lucida Grande';
}
`}</style>
</div>
);
}