
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
react_generator
Advanced tools
An Accio generator that creates a skeleton of a React component using CommonJS imports.
npm install accio
npm install react_generator
Example of an accio.config.js that will allow calling the react_generator:
module.exports = {
aliases: {
rc: 'react_component'
},
generators: {
react_component: {
path: '/node_modules/react_generator/react_component.js',
output: function(name) {
return ('/src/components/' + name + '.js.jsx');
},
}
}
};
This will allow calling the generator under the name 'react_component' or 'rc' with Accio and will generate component skeletons in the directory 'src/components/' with the extension '.js.jsx'.
Within the root of your project directory, you should be able to run the either of the following commands to generate a 'to_do_list' component skeleton:
> accio react_component to_do_list
or
> accio rc to_do_list
The generator will use the command line argument as the name of the generated file, and it will create a component using the camel-cased version of the filename. Given the argument 'to_do_list', it will output the following code into the generated file:
var React = require('react/react');
var ToDoList = React.createClass({
/**
* @return {Object}
*/
render: function() {
return (
<p>ToDoList CONTENT HERE</p>
);
}
});
module.exports = ToDoList;
You may pass multiple component names at the same time:
> accio rc to_do_list to_do_item to_do_form to_do_app
This will generate four separate component skeletons.
FAQs
A generator for React Component skeletons, to be used with Accio.
We found that react_generator 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.