Skip to content

Commit

Permalink
feat: export the react context instance
Browse files Browse the repository at this point in the history
  • Loading branch information
petyosi committed Dec 27, 2023
1 parent 9d7e57d commit 3647bfd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 1 addition & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
/**
* This is the doc comment.
* Specify this is a module comm .
* @module gurx
*/
export * from './realm'
export * from './hooks'
export * from './operators'
export { RealmProvider } from './react'
export { RealmProvider, RealmContext } from './react'
4 changes: 4 additions & 0 deletions src/react.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React from 'react'
import { Realm } from './realm'

/**
* @category React Components
* The context that provides the realm to the built-in hooks.
*/
export const RealmContext = React.createContext<Realm | null>(null)

/**
Expand Down

0 comments on commit 3647bfd

Please sign in to comment.