mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
2b99db07f7
Replace `'client'` with `'use client'` as client directive for client components in RSC x-ref: [slack thread](https://vercel.slack.com/archives/C035J346QQL/p1665435520907559) Co-authored-by: JJ Kasper <jj@jjsweb.site>
10 lines
222 B
JavaScript
10 lines
222 B
JavaScript
'use client'
|
|
|
|
import { useState } from 'react'
|
|
|
|
export default function Client() {
|
|
// To ensure that this component is rendered as a client component, we use a
|
|
// state here.
|
|
return useState('client_component')[0]
|
|
}
|