next.js/test/e2e/app-dir/chunk-loading/app/feed/ClientShared.tsx
ClientShared.tsx15 lines323 B
'use client'

import { useReducer } from 'react'

import { LazyShared } from '../../components/LazyShared'

export function ClientDynamicShared() {
  let [shouldload, load] = useReducer(() => true, false)
  if (shouldload) {
    return <LazyShared />
  } else {
    return <button onClick={load}>Load module</button>
  }
}
Quest for Codev2.0.0
/
SIGN IN