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