diff --git a/docs/tutorials/adding-new-item.md b/docs/tutorials/adding-new-item.md new file mode 100644 index 0000000..c1e5bb3 --- /dev/null +++ b/docs/tutorials/adding-new-item.md @@ -0,0 +1,24 @@ +Example code for adding a new item/option to the list of items/options, which the user selects from. +```javascript +const ExampleScreen = () => { + const [open, setOpen] = useState(false); + const [value, setValue] = useState(null); + const [items, setItems] = useState([ + {label: "North America", value: "North America"}, + {label: "Europe", value: "Europe"}, + ]); + + return ( + + ); +}; +```