shun-harutaro / responsive-typing

ThaipingをTS、Function Componentで書き換える (https://github.com/shun-harutaro/thaiping)
0 stars 0 forks source link

applied vocabs #6

Closed shun-harutaro closed 1 year ago

shun-harutaro commented 1 year ago

I got a error like this

Module parse failed: Unexpected token (34:24)
You may need an appropriate loader to handle this file type.
|     onChange: props.checkValue,
|     onBlur: function onBlur() {
>       keepFocus.current?.focus();
|     },
|     __self: _this,
shun-harutaro commented 1 year ago
const keepFocus = useRef<HTMLInputElement>(null);
keepFocus.current?.focus();

It does not work. so...

const keepFocus = useRef<any>(null);
keepFocus.current.focus();