Function RealmProvider

  • The Provider component that is required to wrap any component using the Realm hooks.

    Parameters

    • props: ProviderProps

      The Realm.Configuration for this Realm, passed as props. By default, this is the main configuration for the Realm.

    • Optional context: any

    Returns null | ReactElement<any, any>

    Example

    const AppRoot = () => {
    const syncConfig = {
    flexible: true,
    user: currentUser
    };

    return (
    <RealmProvider schema={[Task, User]} path={"data.realm"} sync={syncConfig}>
    <App/>
    </RealmProvider>
    )
    }

Properties

contextTypes?: ValidationMap<any>
defaultProps?: Partial<ProviderProps>
displayName?: string
propTypes?: WeakValidationMap<ProviderProps>

Generated using TypeDoc