react-node-resolver

WebJar for react-node-resolver

License

License

MIT
Categories

Categories

React User Interface Web Frameworks
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

react-node-resolver
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

react-node-resolver
WebJar for react-node-resolver
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/jossmac/react-node-resolver

Download react-node-resolver

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/react-node-resolver/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>react-node-resolver</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/react-node-resolver/
implementation 'org.webjars.npm:react-node-resolver:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/react-node-resolver/
implementation ("org.webjars.npm:react-node-resolver:1.0.1")
'org.webjars.npm:react-node-resolver:jar:1.0.1'
<dependency org="org.webjars.npm" name="react-node-resolver" rev="1.0.1">
  <artifact name="react-node-resolver" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='react-node-resolver', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "react-node-resolver" % "1.0.1"
[org.webjars.npm/react-node-resolver "1.0.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

React Node Resolver

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

Build Status

Alternative Solutions

Since creating this utility, more robust solutions have become available. Consider the following before using this package:

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

Property Type Description
children Element A single react Component
innerRef ElementRef Callback ref ref => this.node = ref

Versions

Version
1.0.1