npmcommand. You will need to initialize the node package to start. This will create a
package.jsonfile in your directory.
universal-dashboardpackage along with any other packages you wish to use in your component. We are using React95 in this example. We will build a control based on that library.
.babelrcfile to configure Babel for React.
webpack.config.jsfile you can use to configure Webpack. You can safely change the
ud95entry key name and library value to one that matches your library.
index.js file. The entry point for your library is the first place Webpack will look. It will discover all other components from import statements in your code. The index.js file is where you should register your components. You can use the
registerComponentfunction to do so.
typeproperty of your hashtable needs to match with the first parameter of
textproperty of the hashtable like this.
Registeron the endpoint in PowerShell and pass in the Id and PSCmdlet variables.
props.onClickfunction call. This will automatically call the PowerShell script block on the server.
setStateprop is used to set the state of the component. This ensures that the state is tracked and your component will work with
props.setStateand pass in the new text value for the state.
childrenprop is a standard React prop. If your component supports child items, such as a list or select box, you should use the standard
props.childrenprop to ensure that the cmdlets
ud-componenttag in your module manifest. The marketplace syncs with the Gallery every hour and your component will be enabled for anyone to find after that.