
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
react-dom-parser
Advanced tools
A DOM parser for the react library, used for instantiating react components declaratively
A DOM parser for the react.js library, used for instantiating react components declaratively.
npm install react-dom-parser --save-dev
html declaration
<div data-react-component="my-module" data-react-props="
name: 'simon staton',
data: {
age: 23
}
"></div>
Before instantiating a react component you must first register it in the parsers registry.
var parser = require('react-dom-parser');
var myReactComponent = React.createClass({
render: function(){
return ...
}
});
parser.register('my-module', myReactComponent);
parser.register({
my-module: myReactComponent
});
Once modules have been registered you may parse the DOM to instantiate them
parser.parse(document.getElementsByTagName("BODY")[0]);
FAQs
A DOM parser for the react library, used for instantiating react components declaratively
The npm package react-dom-parser receives a total of 9 weekly downloads. As such, react-dom-parser popularity was classified as not popular.
We found that react-dom-parser 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.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.