Build web apps and automate tasks with Google Apps Script Apps Script is a rapid application development platform that makes it fast and easy to create business applications that integrate with Google Workspace. Start Scripting Build with Google Feature-rich APIs let you extend Google services and build your own web applications. Code on the Web A web browser is all you need to build with Google A
@types/react の型定義を雰囲気で使っている皆さん、こんにちは。React コンポーネントを書くときはどの型を使い、どう書くべきか?という疑問を Twitter でお見かけし、雰囲気で使っていた私も気になったので @types/react の中身を覗いてみました。 master に入り、いよいよリリース間近な Hooks。本稿は FC(旧SFC) の話が前提です。VScode で型付けをしようとすると、似たような型が山ほど出てきて、どれを使うのが適切なのか・違いが何なのか…パッと見分かりませんね。 ReactNode ReactChild ReactElement StatelessComponent FunctionComponent JSX.Element SFC FC という訳で、こんな Props を持っているコンポーネントの各種書き方を比較、白黒ハッキリさせていきたいと
The Qiita Advent Calendar 2018 is supported by the following companies, organizations, and services.
アプリケーションUIには、画面を覆い被しユーザー操作を限定する global UI があります。Modal がその代表的なもので、管轄する Queue をアプリケーションで1つ構えておくと有用です。2重表示に悩む事なく、表示待ち行列を操作したり、要件拡張の際に柔軟に対応することが出来ます。 code: github / $ yarn 1223 文字入力で動的に Modal を登録、再生で登録済みのモーダルを順次表示するサンプルを紹介します。 useModalQueue Queue を扱う Custom Hooks の内訳です。 const useModalQueue = () => { const [state, update] = useState<State>(...) const renderModal = useMemo(...) // 表示する QueueItem の参照 con
React x TypeScript の鬼門のひとつに「props に記述する EventCallback の適切な書き方が分からない」というものがあります。さて、このコンポーネントの type Props どう型定義するべきでしょうか? const View: React.FC<Props> = props => ( <form onSubmit={props.onSubmit}> <input type="text" onClick={props.onClick} onChange={props.onChange} onKeyPress={props.onkeypress} onBlur={props.onBlur} onFocus={props.onFocus} /> <div onClick={props.onClickDiv} /> </form> ) type Props =
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く