What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-09 18:08:02
search bar idle time react js
How about a custom hook? import {useEffect, useRef, useState} from "react"; export default function useSearchInputState(searchHandler) { // to prevent calling the handler on component mount const didMountRef = useRef(false); const [s... Add solution -
Other 2021-09-09 09:51:01
react form
import React from "react"; import { useForm, Controller } from "react-hook-form"; import Select from "react-select"; import Input from "@material-ui/core/Input"; import { Input as InputField } from "antd";... Add solution -
Javascript 2021-09-09 07:55:02
react setstate in another component
// myContainer.js import React, { useState } from 'react' import MyChild from 'some/path/myChild' function MyContainer() { const [name, setName] = useState('foo') return ( <MyChild name={name} onNameChange={setName} /> ) } export defaul... Add solution -
Python 2021-09-08 22:30:02
wxpython custom dialog
#!/usr/bin/env python ''' ZetCode wxPython tutorial In this code example, we create a custom dialog. author: Jan Bodnar website: www.zetcode.com last modified: July 2020 ''' import wx class ChangeDepthDialog(wx.Dialog): def __init__(self, *args,... Add solution -
Javascript 2021-09-08 16:15:02
open modal on clicking select option in react
import * as React from 'react'; export class Demo extends React.Component<{}, {}> { state = { options: [ { text: 'doNothing', value: 'doNothing' }, { text: 'openModal', value: 'openModal' } ], open: false }; onClose =... Add solution -
Javascript 2021-09-08 15:24:01
smtpjs attachment
<html> <script src="https://smtpjs.com/v3/smtp.js"></script> <input type="file" id="fileupload" onchange="uploadFileToServer()" /> <script> function uploadFileToServer() { var file = ... Add solution -
Javascript 2021-09-08 10:44:02
make a fixed list in react native
export default function App() { const [enteredGoal,setEnteredGoal] = useState(''); const [courseGoals, setCourseGoals] = useState([]); const goalInputHandler = (enteredText) => { setEnteredGoal(enteredText); } const addGoalHandler = () =&... Add solution
Best helpers
Ranking is empty