mirror of
https://github.com/plankanban/planka.git
synced 2025-07-28 17:49:43 +02:00
12 lines
292 B
JavaScript
12 lines
292 B
JavaScript
|
import { useCallback, useState } from 'react';
|
||
|
|
||
|
export default (initialValue) => {
|
||
|
const [value, setValue] = useState(initialValue);
|
||
|
|
||
|
const handleChange = useCallback(({ target: { value: nextValue } }) => {
|
||
|
setValue(nextValue);
|
||
|
}, []);
|
||
|
|
||
|
return [value, handleChange, setValue];
|
||
|
};
|