redux-capi

redux-capi

    ›Reference

    Introduction

    • What it is
    • Usage
    • Rationale
    • Context

    API Specs

    • API Spec
    • Redactions
    • Selectors
    • Thunks
    • Mounting
    • Composing
    • Validation

    Reference

    • createAPI
    • API
    • api.mount()
    • api.mock()
    • Injection
    • Utilities

    Examples

    • Todo List

    Utilities

    There are several utility functions that can be invoked from the API function.

    apiFunction.getState()
    

    Returns the current state and can be useful when testing the API

    apiFunction.getStore();
    

    Returns the redux store that the api was mounted into

    In addition for debugging of applications a trace function is exported and may be overridden to log details of how the API is operating such as logging state changes and renders

    import { reducer, trace } from 'redux-capi';
    
    trace.log = t => console.log(t);
    
    ← InjectionTodo List →
    redux-capi
    Docs
    Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
    Community
    User ShowcaseStack OverflowProject ChatTwitter
    More
    BlogGitHubStar
    Facebook Open Source
    Copyright © 2020 Sam Elsamman