UNPKG

@applicaster/quick-brick-core

Version:

Core package for Applicaster's Quick Brick App

25 lines (20 loc) 614 B
import * as React from "react"; import * as R from "ramda"; import { connectToStore } from "@applicaster/zapp-react-native-redux"; import { ActionsProvider as ActionsProviderComponent } from "./ActionsProvider"; const ActionsProvider = connectToStore(R.pick(["plugins"]))( ActionsProviderComponent ); /** * * Action provider decorator, used to provide Action plugins context to the entire app. */ export function withActionsProvider(Component) { return function WrappedActionsProvider(props) { return ( <ActionsProvider> <Component {...props} /> </ActionsProvider> ); }; }