export default function NewWord({wordGroup}: Props): ReactElement {
    const dispatch = useDispatch();
    const [name, setName] = useState('');
    const onCreate = useCallback(() => {
        if(name.length > 0) {
            dispatch(createWord(wordGroup, name));
            setName('');
            dispatch(loadWordGroups());
        }