Socket
Socket
Sign inDemoInstall

react-node-resolver

Package Overview
Dependencies
8
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-node-resolver

A generic technique for resolving the DOM node of any react component.


Version published
Weekly downloads
35K
decreased by-6.49%
Maintainers
2
Install size
7.39 kB
Created
Weekly downloads
 

Readme

Source

React Node Resolver

A generic technique for resolving the DOM node of any react component.

Build Status

Install

yarn add react-node-resolver

Use

import NodeResolver from 'react-node-resolver';

class ObfuscatedComponent extends Component {
  render() {
    return <div id="inaccessible-node" />;
  }
}

class GroovyThing extends Component {
  getNode = (ref) => {
    console.log(ref); // <div id="inaccessible-node" />
  }
  render () {
    return (
      <NodeResolver innerRef={this.getNode}>
        <ObfuscatedComponent />
      </NodeResolver>
    );
  }
}

Props

PropertyTypeDescription
childrenElementA single react Component
innerRefElementRefCallback ref ref => this.node = ref

Keywords

FAQs

Last updated on 19 Dec 2018

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • 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