rsnext/test/integration/css-fixtures/hydrate-without-deps/pages/index.js
Joe Haddad 06d8acdfd0
Update stylesheets on page navigation (#16126)
This pull request adds a test case for the reproduction provided in #12445. This bug is specifically caused when loading the next page before navigation has actually occurred.

---

Fixes #12445
2020-08-17 21:20:05 +00:00

17 lines
347 B
JavaScript

import { useEffect, useState } from 'react'
import css from './index.module.css'
export default function Home() {
const [state, setState] = useState('')
useEffect(() => {
setState('mounted')
}, [])
return (
<main>
<h1 id="black-title" className={css.header}>
Black
</h1>
<p>{state}</p>
</main>
)
}