Files
Jiachi LiuandGitHub 063154918c Fix react packages are not bundled for metadata routes (#55579)
`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
2023-09-19 15:45:59 +02:00

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 />