mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
`isAppLayer` condition was missing `app-metadata-route` layer, made it as a util now like other webpack layer utils, add metadata route layer to the group. Then `React.cache` can be available there. Also update regex to be compatible across platform Fixes #55561 Closes NEXT-1635
11 lines
204 B
TypeScript
11 lines
204 B
TypeScript
'use client'
|
|
|
|
import React from 'react'
|
|
|
|
function ClientComponent() {
|
|
const [state] = React.useState('component')
|
|
return <div>{`client-` + state}</div>
|
|
}
|
|
|
|
export const clientRef = <ClientComponent />
|