1.0.0 • Published 2 years ago

@react4tv/react-safe-component v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

React SafeComponent

Wrap React Component class, restrict visibility by mount state

Installation

Using npm:

npm install --save @react4tv/react-safe-component

or using yarn:

yarn add @react4tv/react-safe-component

Usage

Gets the application instance ID.

Examples

import { SafeComponent } from '@react4tv/react-safe-component';

class Example extends SafeComponent<{},{}>{
    _componentDidMount(){
        // Use like setState
        this.setStateSafe({})
    }
    _componentWillUnmount(){
        //...
    }
    renderContent(): React.ReactNode {
        return <div />
    }
}