
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.
react-gen-wizard-watson
Advanced tools
Generic react component for creating wizards, and passing data between steps
Generic react component for creating wizards, and passing arbitrary data between the wizard's steps.
npm install react-gen-wizard-watson
Each step in the wizard is a react component. Your component needs to implement two methods, onPrev() & onNext(). These methods will be called if the previous, or next, button has been clicked while the component was active. These methods are used to add new, change, and/or reset data, for the next or previous step. Two callback props, onPrevEnded(dataObj) & onNextEnded(dataObj), are injected into your component, and should be raised at the end of onPrev, and onNext. The dataObj parameter, will be passed to the next, or previous, component, depending on what the user clicked.
####Example step component:####
import React from 'react';
export default class TestComponent extends React.Component {
_getData(step) {
var dataToPass = Object.assign({}, this.props.data);
dataToPass.step = step;
return dataToPass;
}
onNext() {
console.log('onNext called');
this.props.onNextEnded(this._getData(++this.props.data.step));
}
onPrev() {
console.log('onPrev called');
this.props.onPrevEnded(this._getData(--this.props.data.step));
}
render() {
return <div>Hello I am just a test component :). I am step {this.props.data.step}</div>;
}
}
In order to use the default style, import the css/Wizard.css file into your page.
##Using the wizard component##
import Wizard from 'react-gen-wizard';
export default class TestWizard extends React.Component {
render() {
return <Wizard components={acquireComponents} onFinish={this.props.onFinish} />;
}
}
###Configuring your steps components### The Wizard component, has a property called components, which is an array of objects, that configure each wizard step. Each component configuration object has the following shape:
{
name: 'Title',
component: StepComponentName,
additionalProps: {},
showButtons: true,
breadcrumbNamePath: 'prop.to.show'
}
The example folder contains an example jspm project.
cd into the example folder
Install jspm & jspm-server
npm install jspm jspm-server
Install dependencies
jspm install
Run
jspm-server
FAQs
Generic react component for creating wizards, and passing data between steps
We found that react-gen-wizard-watson 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.