New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-first-matching-node

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-first-matching-node

Register DOM nodes in React and do something with the first one

latest
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

react-first-matching-node

Manager

Props

PropTypeDescription
nameStringnamespace for the Manager. Targets will register themselves against this namespace.
activeBooleanWhen this is true, the Manager will run a check to find the first Target and fire the registered callback for that Target.
idsString[]Which Target IDs should be considered when checking for the first target

Target

Props

PropTypeDescription
idStringID for the target. Needs to be unique
childrenFunctionA function that returns a React node. It is passed a single parameter of type TargetNodeProps, which are the props that should be spread onto your target HTML node, for example your containing div.
onMatchFunctionA function that is called when this target is the first matching node. It is called with a reference to the DOM node that TargetNodeProps were applied to

FAQs

Package last updated on 31 Jan 2019

Did you know?

Socket

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.

Install

Related posts