Big news!Introducing Socket AI - ChatGPT-Powered Threat Analysis. Learn more
Socket
Log inDemoInstall

react-native-interactions

Package Overview
Dependencies
2
Maintainers
1
Versions
9
Issues
File Explorer

Advanced tools

react-native-interactions

React Native InteractionManager helpers

    0.4.0latest
    GitHub

Version published
Maintainers
1
Weekly downloads
308
decreased by-42.32%

Weekly downloads

Readme

Source

React Native Interactions NPM version

React Native InteractionManager helpers.

Demo

import {AfterInteractions} from 'react-native-interactions'; function MyComponent() { return ( <AfterInteractions> <ExpensiveComponent/> </AfterInteractions> ); }

Installation

npm i --save react-native-interactions

Usage

AfterInteractions

A component that only renders children after InteractionManager.runAfterInteractions(). Wrap top-level Navigator scenes with this component to improve animation perfomance.

import {AfterInteractions} from 'react-native-interactions'; function MyScene() { return ( <AfterInteractions placeholder={<CheapPlaceholder/>}> <ExpensiveComponent/> </AfterInteractions> ); }

Props:

proptypedefaultdescription
placeholderreact elementnull(optional) prerendered placeholder content
renderPlaceholderfunctionnull(optional) placeholder renderer

renderAfterInteractions

Same as AfterInteractions component, but in the form of a decorator.

import {renderAfterInteractions} from 'react-native-interactions'; @renderAfterInteractions class ExpensiveComponent extends Component { static placeholder = <CheapPlaceholder/>; render() { // expensive stuff } }

or:

@renderAfterInteractions({placeholder: <CheapPlaceholder/>}) class ExpensiveComponent extends Component { // expensive stuff }

or:

class ExpensiveComponent extends Component { // expensive stuff } export default renderAfterInteractions(ExpensiveComponent);

Options:

optiontypedefaultdescription
hoistStaticsbooleantrue(optional) copy non-react static props to composed component
placeholderreact elementnull(optional) prerendered placeholder content
renderPlaceholderfunctionnull(optional) placeholder renderer

License

MIT

Keywords

FAQs

Last updated on 08 Jul 2017

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc