New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

componentpath-react-mixin

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

componentpath-react-mixin

React mixin to add data attribute to component element containing path to source file.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

componentpath-react-mixin

NPM

React mixin to add data attribute to component element containing path to source file. Very useful for QA and debugging code at runtime, particularly UI issues.

Installation

npm install componentpath-react-mixin

Usage

Require the mixin into your component and pass in the file path using the node '__dirname' variable:

var ComponentPathMixin = require('componentpath-react-mixin')(__dirname);

Then include the mixin as normal:

mixins: [ComponentPathMixin]

You can also pass context into your component path to differentiate between different insatnces of the same component. Just pass a 'componentContext' property into your component:

<ReactElement componentContext="context" />

Release History

0.0.1 Initial release 0.0.2 Created tests 0.0.3 Completed readme 1.0.0 Released to NPM 1.0.1 Added NPM badge to readme

Keywords

FAQs

Package last updated on 12 Mar 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc