Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
react-native-interactions
Advanced tools
Readme
React Native InteractionManager helpers.
import {AfterInteractions} from 'react-native-interactions';
function MyComponent() {
return (
<AfterInteractions>
<ExpensiveComponent/>
</AfterInteractions>
);
}
npm i --save react-native-interactions
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:
prop | type | default | description |
---|---|---|---|
placeholder | react element | null | (optional) prerendered placeholder content |
renderPlaceholder | function | null | (optional) placeholder renderer |
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:
option | type | default | description |
---|---|---|---|
hoistStatics | boolean | true | (optional) copy non-react static props to composed component |
placeholder | react element | null | (optional) prerendered placeholder content |
renderPlaceholder | function | null | (optional) placeholder renderer |
MIT
FAQs
React Native InteractionManager helpers
The npm package react-native-interactions receives a total of 240 weekly downloads. As such, react-native-interactions popularity was classified as not popular.
We found that react-native-interactions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.