npm
command. You will need to initialize the node package to start. This will create a package.json
file in your directory.universal-dashboard
package 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..babelrc
file to configure Babel for React.webpack.config.js
file you can use to configure Webpack. You can safely change the ud95
entry 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 registerComponent
function to do so.type
property of your hashtable needs to match with the first parameter of registerComponent
that you called in your JavaScript.withComponentsFeature
high-order function.text
property of the hashtable like this.Register
on the endpoint in PowerShell and pass in the Id and PSCmdlet variables.props.onClick
function call. This will automatically call the PowerShell script block on the server.setState
prop is used to set the state of the component. This ensures that the state is tracked and your component will work with Get-UDElement
.props.setState
and pass in the new text value for the state.children
prop is a standard React prop. If your component supports child items, such as a list or select box, you should use the standard props.children
prop to ensure that the cmdlets Add-UDElement
, Remove-UDElement
and Clear-UDElement
function correctly.ud-component
tag in your module manifest. The marketplace syncs with the Gallery every hour and your component will be enabled for anyone to find after that.