What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-01-23 02:16:22
react onclick parameter
import React from 'react'; const ExampleComponent = () => { function sayHello(name) { alert(`hello, ${name}`); } return ( <button onClick={() => sayHello('James')}>Greet</button> ); } export default ExampleComponent; Add solution -
Javascript 2021-11-04 11:14:06
next js modal dialog
import React from "react"; // reactstrap components import { Button, Modal, ModalBody, ModalFooter } from "reactstrap"; function Example() { const [modalOpen, setModalOpen] = React.useState(false); return ( <> <... Add solution -
Javascript 2021-10-26 03:43:05
how to call a function in react with arguments onclick
import React from 'react'; const ExampleComponent = () => { function sayHello(name) { alert(`hello, ${name}`); } return ( <button onClick={() => sayHello('James')}>Greet</button> ); } export default ExampleComponent; Add solution -
Other 2021-09-13 18:22:04
react-native date time picker
expo install react-native-modal-datetime-picker @react-native-community/datetimepicker import React, { useState } from "react"; import { Button, View } from "react-native"; import DateTimePickerModal from "react-native-modal-date... Add solution