Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kuma UI が提唱する Hybrid Approach CSS-in-JS の仕組み

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.
Avatar for Yuku Kotani Yuku Kotani
December 14, 2023

Kuma UI が提唱する Hybrid Approach CSS-in-JS の仕組み

Avatar for Yuku Kotani

Yuku Kotani

December 14, 2023
Tweet

More Decks by Yuku Kotani

Other Decks in Programming

Transcript

  1. 小谷 優空 - @yukukotani ・Software Engineer @ Ubie, Inc. (2019/05~)

      ・Head of System Platform ・Maintainer of Kuma UI ・Student @ Univ. Tsukuba (2019/04~)   ・情報科学類 自己紹介
  2. Hybrid Approach の仕組み useInsertionEffect とは ・React 組み込みの CSS-in-JS のためだけの Hooks

    ・useEffect とほぼ同じだが、実行タイミングだけが違う  ・コンポーネントのレンダリング結果をDOMに反映する前に実行  ・→ チラ付き(FOUC)を回避できる Boxコンポーネントの 実行(レンダリング) useIntersectionEffectで styleタグ差し込み レンダリング結果を 画面(DOM)に反映 useEffectの実行