I am new to SharePoint framework and React JS.
I have build a basic Web Part with CRUD operation using React JS.
I wanted to show drop-down(html select) value on Page Load in an alert. I am able to get an alert on page load but not able to figure out how to get html select value in that alert.
Please advice.
Here is my code for getting alert on page load.
componentDidMount() {
alert("Hi");
}
public render(): React.ReactElement<IReactCrudProps> {
return (
<select id="myDDl">
</select>
);
}
componentDidMountfunction maybe using React state or some javascript then he/she can show it in an alert.