rsnext/packages/next/client/rsc.ts
Jiachi Liu 6f8cf675d3
Add unstable_useRefreshRoot (#32342)
## Feature

Resolves #32332

- [x] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`
2021-12-10 10:22:31 +00:00

7 lines
185 B
TypeScript

import { createContext, useContext } from 'react'
export const RefreshContext = createContext((_: any) => {})
export function useRefreshRoot() {
return useContext(RefreshContext)
}