
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
patternplate-transform-react-mount
Advanced tools
patternplate transform mounting react components with full life cycle on the client side
patternplate transform mounting react components with full life cycle on the client side.
npm install --save patternplate-transform-react-mount react react-dom
module.exports = React.createClass({
displayName: 'MyAwesomePattern',
render: function() {
return React.createElement('div', {className: 'my-awesome-pattern'}, 'My awesome Pattern.');
}
});
module.exports = React.createClass({
displayName: 'MyAwesomePattern',
render: function() {
return React.createElement('div', {className: 'my-awesome-pattern'}, 'My awesome Pattern.');
}
});
var mountableElement = React.createElement(module.exports);
var mountElement = document.querySelector('[data-mountpoint]');
React.render(mountableElement, mountElement);
Install patternplate-transform-react-mount, patternplate-transform-react, patternplate-transform-react-to-markup, react and react-dom in your patternplate project.
No configuration parameters available yet
patternplate-transform-react-mount is triggered by patternplate-transform-react-to-markup. To enable auto mounting enable it in patternplate-transform-react-to-markup config.
⇨ See patternplate-transform-react-to-markup for details
patternplate-transform-react-mount provides interoperability with react 0.13 and 0.14. The decision making on the used call happens according to these rules:
if React.version gte 0.14
if require.resolve('react-dom') fails
warn
use React.render
else if require.resolve('react') succeeds
use ReactDOM.render
else
use React.render
This means you can use react with and without react-dom - you'll see a warning with react >= 0.14, though:
[ ⚠ External Deprecation ⚠ ] React version 0.14.7 deprecated React.render and moved it to react-dom's render, but react-dom is not available via require.resolve. Consider installing react-dom.
Copyright 2016 by SinnerSchrader Deutschland GmbH and contributors. Released under the MIT license.
FAQs
patternplate transform mounting react components with full life cycle on the client side
We found that patternplate-transform-react-mount 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.