rescribet/link-redux

View on GitHub
src/components/RenderStoreProvider.tsx

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import React, { ReactNode } from "react";

import { LRSCtx } from "../contexts/LRSCtx";
import { LinkReduxLRSType } from "../types";

export interface RenderStoreProviderProps {
    children?: ReactNode;
    value: LinkReduxLRSType;
}

export const RenderStoreProvider: React.FC<RenderStoreProviderProps> = ({ children, value }) => {
    return React.createElement(
        LRSCtx.Provider,
        { value },
        children,
    );
};