typescript
vite
react
react-hook-form
classnames
bootstrap
Performant, flexible and extensible forms with easy-to-use validation.
// app.tsx
import { useForm, SubmitHandler } from "react-hook-form";
const {
register,
handleSubmit,
formState: { errors: formErrors },
} = useForm<formProps>();
<form onSubmit={handleSubmit(onSubmit)}>
<input
className={classNames({
"form-control": true,
"is-invalid": formErrors.text,
})}
id="text"
type="text"
autoComplete="off"
placeholder="Please input text"
{...register("text", { required: true, maxLength: 10 })}
/>;
<button type="submit" className="btn btn-primary">
Submit
</button>
</form>
Arch Tips EFI區掛載位置 /boot/efi ibus設定 for KDE Plasma # ~/.profile export QT_IM_MODULE=ibus export GTK_IM_MODULE=ibus export XMODIFIERS=@im=ibus ibus-daemon -drx --panel=/usr/lib/kimpanel-ibus-panel
Jan 13, 2023SSH處理方法 校內防火牆在SSH密碼打錯太多次及SSH session閒置斷線數次後會把校外IP給擋掉,需要數日才會解除,造成校外辦公及開發困難,這邊提供一些解決方案: SSH伺服端關閉自斷斷線 修改伺服端的/etc/ssh/sshd_config 找到ClientAliveInterval及ClientAliveCountMax並將注釋符號("#")去掉 值改成下圖設定後存檔重啟sshd服務或reboot ClientAliveInterval 30 ClientAliveCountMax 20
Jul 8, 2021mdns discovery on Arch Linux Most application using glibc to resolve domain if using mdns on lan network like hotstname.local you can install nss-mdns, a plugin for glibc, to resolve domain. Install nss-mdns $ yay -S avahi nss-mdns Editor nsswitch.conf $ sudo nano /etc/nsswitch.conf
Jul 8, 2021Firefox Change Emoji font Delete the file: sudo rm /usr/lib/firefox/fonts/TwemojiMozilla.ttf Change Setting at about:config: font.name-list.emoji : JoyPixels
Jun 25, 2021or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up