hunk.code_window: {
   	"name": "@tldraw/state",
   	"description": "A tiny little drawing app (state).",
   	"version": "2.0.0-beta.0",
   	"packageManager": "yarn@3.5.0",
   	"author": {
   		"name": "tldraw GB Ltd.",
   		"email": "hello@tldraw.com"
   	},
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.after_edit: 	"version": "2.0.0-alpha.17",
  
hunk.file_path: packages/state/package.json
hunk.type: replace
file: import { assertExists } from '@tldraw/utils'
  import { createContext, useContext } from 'react'
  
  const ContainerContext = createContext<HTMLDivElement | null>(null)
  
  /** @internal */
  export function ContainerProvider({
  	container,
  	children,
  }: {
  	container: HTMLDivElement
  	children: React.ReactNode
  }) {
  	return <ContainerContext.Provider value={container}>{children}</ContainerContext.Provider>
  }
  
  /** @public */
  export function useContainer(): HTMLDivElement {
  	return assertExists(useContext(ContainerContext), 'useContainer used outside of <Tldraw />')
  }
  