React Hooks, useReducer with a demo
In select element we don't have a placeholder attribute but we can add it by using element with disabled
, selected
and hidden
attribute.
<select>
<option value="" disabled selected hidden>Choose your framework</option>
<option value="react">React</option>
<option value="Vue">Vue</option>
<option value="Angular">Angular</option>
</select>
How to clean up subscriptions in react components using AbortController? #react $useEffect
EventTarget.addEventListener() #javascript
Dynamic Form Fields in React #react
[{ foo: "hello", bar: 3, baz: true }, { foo: "world", bar: 7 }, { foo: ":)", bar: 0, baz: false }];
React.PropTypes.arrayOf(
React.PropTypes.shape({
foo: React.PropTypes.string.isRequired,
bar: React.PropTypes.number.isRequired,
baz: React.PropTypes.bool
})
);