並び順

ブックマーク数

期間指定

  • から
  • まで

561 - 600 件 / 832件

新着順 人気順

react.jsの検索結果561 - 600 件 / 832件

  • Airシフトにおけるパフォーマンス改善とリファクタリング事例 | Recruit Tech Blog

    はじめに リクルートテクノロジーズの 辻 健人です. GitHub では maxmellon で活動しています. 今回は,『Airシフト』における パフォーマンス改善とリファクタリングの事例を一つずつ紹介したいと思います. 『Airシフト』とは 『Airシフト』は,やりとりも作成も楽になるシフト管理サービスです. 直感的に操作できるシンプルな画面で,カンタンにシフト作成が行えます. 技術スタックとしては, React/Redux ,チャット機能に WebSocket, SSR やユーザ認証,ファイルダウンロードにBFFアーキテクチャを採用しています. 『Airシフト』はシフト表の作成や管理ができるだけでなく,大きな機能の一つとして 『シフトボード』を活用したチャットを行うことも可能です. 例えば,急用で別のスタッフにシフトを変わってもらうときや,シフトの希望を提出する締め切り前にチャットを

      Airシフトにおけるパフォーマンス改善とリファクタリング事例 | Recruit Tech Blog
    • GitHub - nanojsx/nano: 🎯 SSR first, lightweight 1kB JSX library.

      You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

        GitHub - nanojsx/nano: 🎯 SSR first, lightweight 1kB JSX library.
      • The definitive guide to profiling React applications

        Knowing how to profile a React application to improve real-world performance is a good tool in any front-end developer’s toolkit. The Profiler API allows us to do just that with insights on why and how long our components are rendering for. We can use the profiling data to find unnecessary and expensive renders that may be impacting performance negatively. Thankfully, it’s not that complicated. Le

          The definitive guide to profiling React applications
        • React でクラスコンポーネントより関数コンポーネントを使うべき理由 5 選

          ☞ React 一覧JSXJSXの記法条件分岐・ループ処理Design patternCompound ComponentOthersコンポーネントのレンダリング位置をずらすReact HooksReact Hooksとは?useEffectuseEffectのよく間違うポイントuseStateuseStateの注意点useMemouseCallbackuseReducerComponent関数コンポーネントを使うべき理由ReduxRedux の概念RefRefref forwardingServer ComponentReact Server Component Component の種類 React でコンポーネントを定義する際は大きく分けてクラスコンポーネント、関数コンポーネントの 2 つに分けることができます。 これらのコンポーネントについては、コンポーネントと props につい

          • How to Solve the Infinite Loop of React.useEffect()

            useEffect() hook manages the side-effects like fetching over the network, manipulating DOM directly, and starting/ending timers. Although the useEffect() is one of the most used hooks along with useState(), it requires time to familiarize and use correctly. A pitfall you might experience when working with useEffect() is the infinite loop of component renderings. In this post, I'll describe the com

              How to Solve the Infinite Loop of React.useEffect()
            • サーバーサイドの人を React に引き込む作戦――コンポーネントベースの考え方をまとめる

              Next.js 14 の keynote で、「server actions を使って、ボタンと同じファイル内に SQL が書ける」というキャッチーな光景が、賛否両論を呼んだ。 私個人としては、問題だとは思わない。 なぜなら、既存の「分断された クライアント / サーバー を、BFF も無しでがんばって繋げる」という世界が壊れて、 A. コンポーネントに基づいたアプリケーション設計 B. サーバー側のロジック(→必要に応じて、BFF と 真のサーバーに分かれる?) C. UI の細かな調整(→デザイナと連携 or 融合して消滅?) という形の分業に変わり、フロントエンドエンジニア全員が B. まで担当する必要が無いと考えているからである。 この3つのグループは、ソースコードレベルで連携することができるので、従来のような openAPI およびソースジェネレータに頼った開発よりも連携が容易く

                サーバーサイドの人を React に引き込む作戦――コンポーネントベースの考え方をまとめる
              • Redux Toolkit で React.js の状態管理をもっと簡単にする方法[TypeScript版]

                Redux Toolkit で React.js の状態管理をもっと簡単にする方法[TypeScript版] React.jsの状態管理ライブラリはReduxが有名ですが、結構複雑だったりステートを一つ更新するだけでもタイプ量が多くなってしまうというデメリットもあります。 そこでこの記事ではRedux Toolkitというライブラリを使用して、もう少し簡単に状態管理する方法をご紹介します。 投稿日2020年01月27日 更新日2020年01月29日 環境は react : 16.12 typescript : 3.7 @reduxjs/toolkit : 1.2 react-redux : 7.1 でお送りします。 この記事でやること 基本的に以前作成したTodoアプリにRedux Toolkitを導入します。 Todoアプリについては下記記事を参照ください。 React.js + Typ

                  Redux Toolkit で React.js の状態管理をもっと簡単にする方法[TypeScript版]
                • GitHub - pdfme/pdfme: Open-source PDF generation library built with TypeScript and React. Features a WYSIWYG template designer, PDF viewer, and powerful generation capabilities. Create custom PDFs effortlessly in both browser and Node.js environments.

                  You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                    GitHub - pdfme/pdfme: Open-source PDF generation library built with TypeScript and React. Features a WYSIWYG template designer, PDF viewer, and powerful generation capabilities. Create custom PDFs effortlessly in both browser and Node.js environments.
                  • ReactのUIコンポーネントライブラリ「Chakra UI」とは? カスタマイズ性と生産性を両立しよう【前編】

                    UIをコンポーネント化(画面部品化)して、再利用性を高められるのは、Reactの大きな特徴のひとつです。この特徴を活かして、統一されたデザインを持ち、カスタマイズ性にも優れたUIライブラリが、数多く提供されています。本記事では、特に生産性とカスタマイズ性にフォーカスして作られた、Chakra UIというライブラリについて解説します。 対象読者 JavaScriptとWeb開発の基礎に理解がある方 Reactを用いたJavaScriptアプリケーション開発の経験者 前提環境 筆者の検証環境は以下の通りです。 macOS Big Sur 11.4 Node.js 16.6.1/npm 7.20.3 React 17.0.2 react-scripts 4.0.3 @chakra-ui/react 1.6.6 スタイルに一貫性を持たせる難しさ 前回、前々回は、Material-UIについて解説し

                      ReactのUIコンポーネントライブラリ「Chakra UI」とは? カスタマイズ性と生産性を両立しよう【前編】
                    • SSR、SSG、Client Side Renderingの違いをまとめた - Qiita

                      「Client Side Rendering = SPA」の文脈で使われることが多い気がする。 ブラウザ上でJavaScriptを実行してDOMを生成、マウントし、コンテンツを表示させる。SPAアプリの場合、以下のような中身が空のHTMLファイルを使うことが多い。 <html> <head> <title>sample</title> </head> <body> <div id="app"></div> <script src="/js/bundle.js"></script> </body> </html> 上記のHTMLファイルはルートディレクトリ直下に置くのが普通なため、/以外にリクエストが送られると404となる。開発時はwebpack-dev-serverがよしなに面倒を見てくれるが、ホスティング先ではそうではないので、初めてSPAでアプリを作ってホスティングしたときに戸惑うやつ

                        SSR、SSG、Client Side Renderingの違いをまとめた - Qiita
                      • GitHub - ozanyurtsever/verbum: Verbum is a fully flexible text editor based on lexical framework.

                        import { FC } from 'react'; import { EditorComposer, Editor, ToolbarPlugin, AlignDropdown, BackgroundColorPicker, BoldButton, CodeFormatButton, FloatingLinkEditor, FontFamilyDropdown, FontSizeDropdown, InsertDropdown, InsertLinkButton, ItalicButton, TextColorPicker, TextFormatDropdown, UnderlineButton, Divider, } from 'verbum'; const NoteViewer: FC = () => { return ( <EditorComposer> <Editor hasht

                          GitHub - ozanyurtsever/verbum: Verbum is a fully flexible text editor based on lexical framework.
                        • [React + Google Maps API] @react-google-maps/apiを使った地図アプリをローカルで起動してみた | DevelopersIO

                          [React + Google Maps API] @react-google-maps/apiを使った地図アプリをローカルで起動してみた こんにちは、CX事業本部の若槻です。 Google Maps APIのReact向けライブラリは現在アクティブなものでもいくつか種類がありますが、そのうちのひとつに@react-google-maps/apiがあります。リポジトリやドキュメントは下記となります。 @react-google-maps/api - npm JustFly1984/react-google-maps-api: React Google Maps API React Google Maps Api Style Guide この@react-google-maps/apiは、前回の記事で紹介したものに比べてより頻繁にアップデートが行われているようです。 今回は、@react-g

                            [React + Google Maps API] @react-google-maps/apiを使った地図アプリをローカルで起動してみた | DevelopersIO
                          • React hooks lifecycle diagram

                            React lifecycle Hooks diagram, Functional Components visualized

                            • GitHub - brimdata/react-arborist: The complete tree view component for React

                              You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                GitHub - brimdata/react-arborist: The complete tree view component for React
                              • </> htmx ~ A Real World React -> htmx Port

                                It is all well and good talking about REST & HATEOAS in theory or describing the Hypermedia-Driven Application architecture, but, at the end of the day, what matters in software is practical: Does it work? Does it improve things? We can say for sure that htmx works, since we use it in our own software. But it is hard to say that it would be an improvement over other approaches, since we haven’t ha

                                • 【動画付き】Next.js の Server Side Rendering (SSR) を理解する。create-react-app と比べてみた。 - Qiita

                                  【動画付き】Next.js の Server Side Rendering (SSR) を理解する。create-react-app と比べてみた。JavaScriptNode.jsReactNOWNext.js Next.jsのサイト、かっこいいですよね 😊 クールで、パフォーマンスにも優れていてエンジニアを魅了します。 日本では Nuxt.js が人気のようですが、個人的には Next.js を推しています。 さて、先日 Next.js のチュートリアル を通してサーバサイドレンダリングについて考えさせられる機会がありました。本記事では、そもそもサーバサイドレンダリングのメリットとは?というところから初めて、create-react-app によって実装された SPA と、nextによって実装された SSR ではどのような違いがあるのかを検証してみました。 以下の動画は本記事のサマリ

                                    【動画付き】Next.js の Server Side Rendering (SSR) を理解する。create-react-app と比べてみた。 - Qiita
                                  • GitHub - inokawa/rich-textarea: A small customizable textarea for React to colorize, highlight, decorate texts, offer autocomplete and much more.

                                    Styleable texts: Not just highlighting texts like similar libraries, this library also supports colorizing, decorating and more. Regex or any tokenizers can be used. Easy to interact with events: You can get caret position and can catch some mouse events on texts, which are useful to display something reflects user actions. Compatible with textarea: Except added features, this library is designed

                                      GitHub - inokawa/rich-textarea: A small customizable textarea for React to colorize, highlight, decorate texts, offer autocomplete and much more.
                                    • GitHub - nanostores/nanostores: A tiny (286 bytes) state manager for React/RN/Preact/Vue/Svelte with many atomic tree-shakable stores

                                      You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                        GitHub - nanostores/nanostores: A tiny (286 bytes) state manager for React/RN/Preact/Vue/Svelte with many atomic tree-shakable stores
                                      • 【React】ドラッグ&ドロップで並べ替えできるリストを実装する話

                                        ドラッグ状態で触れた要素のindexがそのまま移動先になると考えるのが1番簡単そうです。 やりたいこと これが検知できるのはonDragEnter,onDragOver,onDropということになります。 ただ、これだと末尾に移動させることができません。 なのでカーソルが触れている位置で移動先を変えることにします。 「上側 → index」「下側 → index + 1」 加えてゴースト(またはキャレット)の表示位置はドラッグ中に移動先が変わるたび更新しないといけないので、移動先の決定にはonDragOverを使用することになります。 ミニマムな実装 以上を踏まえてミニマムに実装したのがこちらです。(ゴーストなどは未実装) 補足 iOSのSafariではdraggable属性だけではなく、CSSで -webkit-user-darg: elementを付けていないとonDragStartが

                                          【React】ドラッグ&ドロップで並べ替えできるリストを実装する話
                                        • https://airbnb.io/visx/

                                            https://airbnb.io/visx/
                                          • React hooksを基礎から理解する (useRef編) - Qiita

                                            React hooksとは React 16.8 で追加された新機能です。 クラスを書かなくても、 stateなどのReactの機能を、関数コンポーネントでシンプルに扱えるようになりました。 React hooksを基礎から理解する (useState編) React hooksを基礎から理解する (useEffect編) React hooksを基礎から理解する (useContext編) React hooksを基礎から理解する (useReducer編) React hooksを基礎から理解する (useCallback編) React hooksを基礎から理解する (useMemo編) React hooksを基礎から理解する (useRef編) 今ここ useRefとは 関数コンポーネントでは、Classコンポーネント時のref属性の代わりに、useRefを使って要素への参照を行

                                              React hooksを基礎から理解する (useRef編) - Qiita
                                            • 【Next.js】みんな next.confing.js にどんなプラグイン入れてる?

                                              Why Next.js 私は、業務でもプライベートでも Next.js を使っています。 Next.js は "Zero Config" をうたっているわけですが、実際業務で使うとなると、なかなか Zero とはいきません。IE11用にトランスパイルが必要になったり、ソースマップのアップロードのために webpack の拡張が必要なるケースにおいては、next.config.js のカスタマイズが必要になります。 そういったカスタマイズをサポートし、設定のストレスから我々エンジニアを開放してくれるパッケージが世の中にはたくさんあります。ということで、自分以外の方々が next.config.js にどのようなプラグインを入れているか気になりました。 まずは、自分がどのようなプラグインを入れているかシェアしたいと思います。 「自分はこんなプラグイン入れていて便利ですよ」みたいなシェアを、Tw

                                                【Next.js】みんな next.confing.js にどんなプラグイン入れてる?
                                              • クラスメソッドのReact事情大公開スペシャル -「長期運用に耐えるフロントエンド目指して」というテーマで登壇しました #クラスメソッド勉強会 | DevelopersIO

                                                クラスメソッドのReact事情大公開スペシャル -「長期運用に耐えるフロントエンド目指して」というテーマで登壇しました #クラスメソッド勉強会 先日、クラスメソッドのReact事情大公開スペシャルというイベントにて、「長期運用に耐えるフロントエンド目指して」というテーマで登壇しました。 登壇資料 登壇資料はこちらです。 フロントエンド開発、順調に進んでる? 会場でも来場者のみなさんに軽く聞いてみましたが、首を横に振られている方が多かったように思います。 (残念ながら私もNoです🥺) なぜそんなに苦労しているのか、それはフロントエンドならではの難しさがあるからだと私は考えています。 一つは変化の激しさです。 Reactを例にとって考えてみると、直近では従来からあるSPA・クライアントサイドでのレンダリングが主流だったものからServer Componentが出てきたりして、関心がサーバ

                                                  クラスメソッドのReact事情大公開スペシャル -「長期運用に耐えるフロントエンド目指して」というテーマで登壇しました #クラスメソッド勉強会 | DevelopersIO
                                                • React Folder Structure in 5 Steps [2022]

                                                  Follow on FacebookHow to structure large React applications into folders and files is a highly opinionated topic. I struggled for a while writing about this topic, because there is no right way to do it. However, every other week people ask me about how I structure my React projects -- with folder structures from small to large React projects. After implementing React applications for a few years

                                                    React Folder Structure in 5 Steps [2022]
                                                  • 今更ながらNext.jsに入門した - maru source

                                                    こんにちは丸山@h13i32maruです。すごい今更ながらNext.jsに入門したので感想をメモしておこうと思います。 入門資料 @hokacchaさんがクックパッド社のインターンシップ用に公開している動画を見て入門しました。要点がコンパクトにまとまってるので、これを見れば基本は理解できるようになってよかったです。 SSG CodeLunch.fmのサイトをNext.jsのSSGで作り直しました。もともとreact-dom/serverのrenderToString()を使ってなんちゃってSSGを自前で実装していたので、移行は簡単でした。getStaticPropsやgetStaticPathsの仕組みはうまいこと考えられてていいな〜と思いました。 それと、データを特に持っていない本当の静的サイトでもNext.js使ってSSGで作るのは良さそうと思いました。サイト内のパーツをReactコン

                                                      今更ながらNext.jsに入門した - maru source
                                                    • GitHub - discord/focus-layers: Tiny React hooks for isolating focus within subsections of the DOM.

                                                      You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                        GitHub - discord/focus-layers: Tiny React hooks for isolating focus within subsections of the DOM.
                                                      • Accessible Animations in React with "prefers-reduced-motion" • Josh W. Comeau

                                                        Accessible Animations in ReactThe “prefers-reduced-motion” Hook Filed underReactoninMay 4th, 2020.May 2020.Last updatedoninJuly 25th, 2024.Jul 2024. IntroductionLong-time readers of this site have probably picked up that I am a big fan of animations. When used properly, I believe they add a ton of value to the user experience. That said, it's important to be mindful of the fact that not everybody

                                                          Accessible Animations in React with "prefers-reduced-motion" • Josh W. Comeau
                                                        • React Router v5.1 で導入された Hooks API について - 30歳からのプログラミング

                                                          React Router のv5.1で Hooks API が導入された。 reacttraining.com URL パラメータやhistoryオブジェクトなどを、より簡単に取得できるようになった。 これまでの書き方も使えるが、今後のバージョンアップで非推奨になる可能性が高いとのことなので、今のうちに Hooks を使った書き方に慣れておいたほうがいいかもしれない。 個人的にはwithRouterを使わなくてもよくなるのが便利だと感じた。 この記事の内容は以下のバージョンで動作確認している。 react@16.10.2 react-router-dom@5.1.2 今回導入された API は以下の4つ。 useParams useLocation useHistory useRouteMatch コードを見ると、どれもReact.useContextを使って実装している模様。 react

                                                            React Router v5.1 で導入された Hooks API について - 30歳からのプログラミング
                                                          • Zodでファイル(画像)のバリデーションをする

                                                            const IMAGE_TYPES = ['image/jpg', 'image/png']; const MAX_IMAGE_SIZE = 5; // 5MB // バイト単位のサイズをメガバイト単位に変換する const sizeInMB = (sizeInBytes: number, decimalsNum = 2) => { const result = sizeInBytes / (1024 * 1024); return +result.toFixed(decimalsNum); }; const schema = z.object({ file: z // z.inferでSchemaを定義したときに型がつくようにするため .custom<FileList>() // 必須にしたい場合 .refine((file) => file.length !== 0, { messag

                                                              Zodでファイル(画像)のバリデーションをする
                                                            • 今から始めるReact入門 〜 React Router - Qiita

                                                              目次 今から始めるReact入門 〜 React の基本 今から始めるReact入門 〜 React Router 編 ←★ここ 今から始めるReact入門 〜 flux編 今から始めるReact入門 〜 Redux 編: immutability とは 今から始めるReact入門 〜 Redux 編: Redux 単体で状態管理をしっかり理解する 今から始めるReact入門 〜 Redux 編: Redux アプリケーションを作成する 今から始めるReact入門 〜 Mobx 編 Single Page Application (SPA)について 今回はreact-router を使用して宣言的記法を利用したSingle Page Application (SPA) の作成について勉強していきたいと思います。 React Router はUI とURL を同期させるライブラリで、例えば閲

                                                                今から始めるReact入門 〜 React Router - Qiita
                                                              • React Router v6 Preview

                                                                The next major version of React Router, version 6, is just around the corner. We published the first alpha release back in January, and we released another alpha last week. For version 6, I'm using "alpha" to mean "not yet feature complete". I also anticipate having some minor breaking changes between alphas as we nail down the final APIs. For these reasons, I've been hesitant to publish anything

                                                                  React Router v6 Preview
                                                                • GitHub - alephjs/aleph.js: The Full-stack Framework in Deno.

                                                                  You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                    GitHub - alephjs/aleph.js: The Full-stack Framework in Deno.
                                                                  • GitHub - samdenty/gqless: a GraphQL client without queries

                                                                    You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                      GitHub - samdenty/gqless: a GraphQL client without queries
                                                                    • How to Use React, the JavaScript Framework

                                                                      I've been hearing about React since I first started learning JavaScript, but I'll admit I took one look at it and it scared me. I saw what looked like a bunch of HTML mixed with JavaScript and thought, isn't this what we've been trying to avoid? What's the big deal with React? Instead, I focused on just learning vanilla JavaScript and working with jQuery in a professional setting. After a few frus

                                                                        How to Use React, the JavaScript Framework
                                                                      • react-router v6.4 で比較的型安全なルーティングを実現することで管理を楽にする

                                                                        import { BrowserRouter, ParamParseKey, Route, Routes, useParams } from "react-router-dom"; import User from "./pages/users/[id]"; import "./App.css"; import Top from "./pages/top"; export const PATHS = { TOP: "/", ABOUT: "/about", USERS_ID: "/users/:id", } as const; // これでクエリパラメータの id が取り出せる export const useParamsUsersId = useParams<ParamParseKey<typeof PATHS.USERS_ID>>; function App() { return (

                                                                          react-router v6.4 で比較的型安全なルーティングを実現することで管理を楽にする
                                                                        • 初心者でも簡単に!Next.jsプロジェクトをVercelにデプロイする方法 - deve.K's Programming Primer - プログラミング初心者のための入門ブログ

                                                                          事前準備 Vercelとは Git Hubと連携 Vercel アカウントの作成 まとめと機能 今回は、Next.jsプロジェクトをデプロイする方法について解説します。 デプロイ先には多くの選択肢がありますが、代表的なものに「Cloudflare Pages」や「Netlify」があります。 この記事では、「Vercel」と「GitHub」を組み合わせてサイトを公開する方法を紹介します。 GitHubはコードのホスティングに使用されます。 一方、ビルドやサイトの公開にはVercelが活用されます。 幸いにも、この方法は複雑な操作を必要としませんので、安心して取り組むことができます。 事前準備 ・ Next.jsプロジェクト ・ Git Hubアカウント ・ VS Code(Visual Studio Code) デプロイするにあたり、Git HubアカウントとVS Code(Visual

                                                                            初心者でも簡単に!Next.jsプロジェクトをVercelにデプロイする方法 - deve.K's Programming Primer - プログラミング初心者のための入門ブログ
                                                                          • Reactでカレンダーを使う - Qiita

                                                                            「react datepicker」でググると、「react-datepicker」のライブラリが出てくると思います。 react-datepickerを使う機会があったので、備忘録にreact-datepickerの機能についてご紹介しようと思います。 0. 事前準備 (create-react-appでサンプルを作成しております。) 早速ライブラリをインストールしましょう!

                                                                              Reactでカレンダーを使う - Qiita
                                                                            • GitHub - pascalw/dashbling: Hackable React based dashboards for developers, inspired by Dashing.

                                                                              You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                                GitHub - pascalw/dashbling: Hackable React based dashboards for developers, inspired by Dashing.
                                                                              • Next.jsのフォルダ構造 | ページレベル最適化と効率的な開発のためのベストプラクティス - deve.K's Programming Primer - プログラミング初心者のための入門ブログ

                                                                                はじめに プロジェクト構成 Next.jsにおけるプロジェクト構成とディレクトリの役割 ルートディレクトリファイル 最後に はじめに 前回のNext.js入門に続き、本日はNext.jsでプロジェクトを構造化する方法について説明していきます。 前回の記事は以下となります。 dev-k.hatenablog.com Next.jsに適したフォルダ構造を自分で考えることは一般的です。 Next.jsにはページレベルでの最適化が存在し、ビルド時にログに記録されたページが表示されます。 すべてのコンポーネントファイルは「pages」フォルダ内でページとして処理されます。 そのため、ページに関係のないコンポーネントを「pages」フォルダに配置すると、ビルド時に不要なコンポーネントがページとして処理され、ビルド時間が増加してしまいます。 今回は、個人開発や小規模なチーム開発向けのNext.jsフォル

                                                                                  Next.jsのフォルダ構造 | ページレベル最適化と効率的な開発のためのベストプラクティス - deve.K's Programming Primer - プログラミング初心者のための入門ブログ
                                                                                • useSelectorとuseDispatchでcontainer componentを排除する - stmn tech blog

                                                                                  はじめに こんにちは。株式会社スタメンでフロントエンドエンジニアをしております@0906kokiです。 React Hooksが2019年にリリースされてから、Reduxの実装でコンポーネントがstoreと接続する方法に選択肢が増えました。 具体的に言うと、今までconnect関数でstoreにあるstateやactionをpresentational componentに対してpropsとして渡していましたが、hooks時代ではuseSelectorとuseDispatchによってconnect関数を書かなくても、storeとの接続が可能になりました。 実装の広がりが出たと同時に、connect関数とuseSelector + useDispatchのどちらを使えばいいのか、いざ実装しようと思った際に悩むかもしれません。 現在、弊社では後者のuseSelectorとuseDispatch

                                                                                    useSelectorとuseDispatchでcontainer componentを排除する - stmn tech blog