並び順

ブックマーク数

期間指定

  • から
  • まで

201 - 220 件 / 220件

新着順 人気順

Reduxの検索結果201 - 220 件 / 220件

  • FN2004005 | React + Redux入門 08: Redux公式サイトのTodoリストの作例をフックuseDispatch()とuseSelector()で書き替える | HTML5 : テクニカルノート

    React + Redux入門 08: Redux公式サイトのTodoリストの作例をフックuseDispatch()とuseSelector()で書き替える ID: FN2004005 Technique: HTML5 / ECMAScript 2015 Library: React 16.13.1 / Redux 4.0.5 / React Redux 7.2.0 前回は「React + Redux入門 02: フィールドに入力したテキストを項目リストに加える」の作例を、フックuseDispatch()とuseSelector()で書き替えました。このシリーズは、Redux公式サイトの「Example: Todo List」をつくるチュートリアルで、第6回ができ上がりです。けれど今回は、「React + Redux入門 05: PropTypesで型を確かめる」の作例(サンプル001)に

    • 駄目になった Redux Thunk を hooks でリファクタリングする

      この記事は React Advent Calendar 13日目の記事です。 皆さん、react-redux の hooks を使っていますか? react-redux は v7.1 より useDispatch useSelector などいくつかの hooks が導入されました。 界隈ではどちらかというと、mapStateToProps の冗長さを置き換えるもの、あるいは Container / Presentation コンポーネント の区別を不要にするものとして注目されている感があります。実際、useSelector によって可能になった設計論は重要です。 しかし本記事ではそれらと違う観点、つまり「設計に失敗した Redux を立て直すための武器として react-redux の hooks がスゴい!」という方向からの解説を行います。 以下、redux のミドルウェアとして re

        駄目になった Redux Thunk を hooks でリファクタリングする
      • Redux Toolkit また(自分が)忘れないための基本まとめ | DevelopersIO

        はじめに おはようございます、もきゅりんです。 大分前に、Redux Toolkit (以後 RTK )を見様見真似で触っていたのですが、改めて最近使おうとしたら、ほとんど記憶から失われていました。 自分の脳みそは、普段あまり使わない記憶をあっという間に風化させてしまいます。(普段フロントエンドを扱うことはほぼないため) そんなこともあり、きっとまたしばらく手つかずにすると記憶から風化する、と予想されたので、未来の自分のために、今の自分がまとめておこうと考えました。 そして、もしかしたら、自分のように、大分前に RTK 触ったけど、何だか覚えていない、、って方や RTK ってどんなものなの?って興味ある人には、もしかしたらお役に立つかもしれない、ということでブログにしておきました。 RTK の導入の仕方は、Getting Started や、TypeScript Quick Start を

          Redux Toolkit また(自分が)忘れないための基本まとめ | DevelopersIO
        • Redux - Toolkit | Yuuniworks Note

          QuickStart​ 目的​ Redux Toolkit は、redux に関する下記の問題を解決するためのツール 初期セットアップが複雑すぎる 便利に使うには多くのパッケージをインストールする必要がある ボイラープレートが多すぎる 全てのケースはカバー出来なくても、大半のケースでコードを簡略化できるツールを目指している create-react-appやapollo-boostの精神に感化されている 含まれるもの​ configureStore() createReducer() createAction() createSlice() createAsyncThunk() createEntityAdapter createSelector --- reselect のcreateSelectorを利便性のために再エクスポートしたもの 基本チュートリアル​ configureStor

          • Reactのこともっとよく知ろう! ~ Redux基礎・イミュータブル編~

            Reactに関することで、同じことを別の人に繰り返し説明している...ような気がしたので、 一念発起して勉強会を開くことにしました。 実装半分/解説半分で勉強会を開催予定です。 今記事は、その解説のために作成した資料ですが、この記事単体でも作業可能なように作っています。 今回扱う主な題目は FLUXとは Reduxのデータフローとは(redux toolkitは何をやっているのか) なぜイミュータブルである必要があるのか になります。 lesson1 - FLUXとは Reduxのデータフローとは(redux toolkitを実装しながら学ぶ) リポジトリを準備する 勉強用リポジトリをGithubにて準備しています。 Github takanokana/react-tag 上記リポジトリのブランチ lessson/1に切り替えて作業を行なってください。 コマンドで、ローカルサーバーが問題な

              Reactのこともっとよく知ろう! ~ Redux基礎・イミュータブル編~
            • Starting a New App With Redux? Consider Context API First

              Auth0 Marketplace Discover and enable the integrations you need to solve identity Explore Auth0 Marketplace If you're bootstrapping a new React application today, ingrained habits might lead you to pick Redux. After all, you need to manage the state. Should you start with Redux, though? That has become a valid question. The latest versions of React have improved their offerings for state handling

                Starting a New App With Redux? Consider Context API First
              • How to Implement Redux in 24 Lines of JavaScript

                90% convention, 10% library. Redux is among the most important JavaScript libraries ever created. Inspired by prior art like Flux and Elm, Redux put JavaScript functional programming on the map by introducing a scalable architecture of three simple points. If you're new to Redux, consider reading the official docs first. Redux Is Mostly Convention Consider this simple counter application that uses

                  How to Implement Redux in 24 Lines of JavaScript
                • Redux with Code-Splitting and Type Checking

                  This article assumes a working knowledge of Redux, React, React-Redux, TypeScript, and uses a little bit of Lodash for convenience. If you’re not familiar with those subjects, you might need to do some Googling. You can find the final version of all the code here. Redux has become the go-to state management system for React applications. While plenty of material exists about Redux best practices i

                    Redux with Code-Splitting and Type Checking
                  • How to test React-Redux connected Components

                    Follow on FacebookThe following implementation is a quick excerpt from one of my daily tasks as a software developer. If I run into a problem and arrive at an example that I find worth sharing, I will put a gist of the code up on this website. It might be useful for someone else stumbling across the same task. React components connected to Redux can turn out pretty complex. Thus most people think

                      How to test React-Redux connected Components
                    • GitHub - reduxjs/rtk-github-issues-example: Source code for the Redux Toolkit Advanced Tutorial

                      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 - reduxjs/rtk-github-issues-example: Source code for the Redux Toolkit Advanced Tutorial
                      • SwiftUI + Redux = ❤️ | Mercari Engineering

                        The 11th day’s post of Mercari Advent Calendar 2019 is brought to you by @damianpasko from the iOS team. State is a very important word for both SwiftUI and Redux. In this case, it’s not only a buzzword, but it’s also a thing that connects them and letting them work together very well. In this article, I will try to show that the above thesis is truthful so let’s get started! The Beginning Redux c

                        • React | Redux(Actions, Reducers, Store)による状態管理 - わくわくBank

                          Reduxによる状態管理の動作確認を行います。Actions, Reducers, Storeなどの役割を実際の処理を通じて確認します。 Reduxの3原則 動作確認をする前に、Reduxの3原則を復習しておきます。 https://redux.js.org/introduction/three-principles にてReduxの3原則が説明されいています。 Single source of truth State is read-only Changes are made with pure functions Reducerは純粋関数でなければならないなどのReduxを利用する上での注意点が述べられています。

                            React | Redux(Actions, Reducers, Store)による状態管理 - わくわくBank
                          • TypeScript+Reduxで全ステートの型を解決するには - Qiita

                            概要 React(Redux)のコードをTypeScriptで書いています。TypeScriptは静的型チェックができるので、とても重宝しています。 さて、ReactとReduxを結びつけるReact-Reduxのconnect関数 connect([mapStateToProps], [mapDispatchToProps], [mergeProps], [options]) - reduxjs/react-redux の引数 mapStateToProps(state, [ownProps]): stateProps ですが、このステート(state)の型は何を指定していますか? ここにはReduxのストアで管理される全ステートが格納されたオブジェクトが渡されますが、この型をTypeScript(2.8以降)でサクッと解決する方法を紹介したいと思います。 使用するストア 例として、書籍

                              TypeScript+Reduxで全ステートの型を解決するには - Qiita
                            • Redux DevToolsを使って、状態変化のプロセスを可視化する | DevelopersIO

                              こんにちは。データアナリティクス事業本部 サービスソリューション部の北川です。 Redux DevToolsとは Redux DevToolsは、Reduxの開発に役立つブラウザ拡張機能の一つで、Reduxプロジェクト内の状態変化の過程を可視化することができます。Reduxだけでなく、状態変化を行うライブラリで利用することができます。Reduxプロジェクトのデバック作業に、非常に便利だと思います。 インストール こちらから、拡張機能をインストールします。 https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=ja 以下のアイコンが追加されます。使用可能な状態の時は、アイコンが緑色になります。クリックするとツールが立ち上がります。 また、chromeのデベロッパ

                                Redux DevToolsを使って、状態変化のプロセスを可視化する | DevelopersIO
                              • How to manage state in Next.js 13 using Redux Toolkit | HackerNoon

                                Too Long; Didn't ReadWith server and client components in next.js 13, this tutorial will take you through integrating and managing state using redux toolkit in your project.

                                  How to manage state in Next.js 13 using Redux Toolkit | HackerNoon
                                • Redux to Apollo: Data Access Patterns | Apollo GraphQL Blog

                                  January 29, 2021Redux to Apollo: Data Access Patterns As part of NerdWallet’s migration from our React-Redux code base to client state management using Apollo, we’ve been exploring how to effectively implement data access patterns, side-effects handling, and other aspects of client state management using GraphQL and Apollo Client. This first post examines how we accomplish effective data access, f

                                    Redux to Apollo: Data Access Patterns | Apollo GraphQL Blog
                                  • React Redux Hooks API でユニットテスト - Qiita

                                    追記: 2020-01-14 たまにこちらの記事を見てくれている方もいるようですが、Sinonに依存しているサンプルのため、新たにReact Redux Hooks API + Jest + TypeScript でユニットテストにSinon依存なしverを書いておきましたので参考までに React Redux Hooks APIが利用可能となりました。 また、型定義も@types/react-redux@7.1.0からこれに対応したものが利用可能です。 テストはどうするのか 従来のconnectを使った場合、いわゆるPresentational ComponentとContainer Componentに分離されるため、 Presentational Componentのテストは抽象化されたPropsで行うことができました。 一方、useSelectorやuseDispatchを使った場

                                      React Redux Hooks API でユニットテスト - Qiita
                                    • ReactRedux.connectでTypeScriptの型推論地獄に迷い込んだ #TypeScript - Qiita

                                      React+Reduxの組み合わせで開発を行っています。 そこで出くわすReactRedux.connect 。 こいつをComponentに食わせるとReduxのStateの情報をPropsにお渡し済みのコンポーネントを返してくれる。 とっても素敵なやつですが、型定義を見ると地獄でした。 ActionDispacherについて Reduxについて弄る時にミドルウエアを駆使して非同期処理をしていましたが以下の記事を見てからは ActionDispacherを使う方針にしています。 ReduxでのMiddleware不要論 https://qiita.com/uryyyyyyy/items/d8bae6a7fca1c4732696 ちょっと改変してActionDispacherにReduxのステートをまるごと渡してなんでもできるクラスにしてしまってます。 export class Actio

                                        ReactRedux.connectでTypeScriptの型推論地獄に迷い込んだ #TypeScript - Qiita
                                      • React超入門 - Qiita

                                        はじめに 本記事は初めてreactを触る人向けに書いています。 reactってなんだ?どう書いたらいいの?という初歩的な内容をまとめています。 ※ライフサイクルの説明は長くなるので割愛させていただきました。 以下の記事が秀逸なのでこちらを紹介させていただきます。 https://qiita.com/Julia0709/items/3c3fc8d29fd2e56ed7a9 Reactとは FaceBookによって開発されたフロントエンドフレームワークで、Reactはリアクティブ・プログラミングで、値がどのように伝わっていくかを重視しています。 従来のjsとの違いとして、表示を更新するとき予め用意した値を設定しておけば元の値を変更すると表示も自動的に更新されます。 また、Reactは直接DOM操作するのではなく、プログラム的に仮のDOMを構築してそれを操作します。 これを仮想DOMといいます。

                                          React超入門 - Qiita
                                        • Reduxの個人的チュートリアル(redux-toolkitあり) - Qiita

                                          はじめに Reduxのチュートリアル用のプレゼンテーションをほぼそのまま乗っけます。間違っているところとかあるかもですのでご承知ください。 比較用のTodoアプリをどうぞ 1.Reduxの基本 Reduxの基本構造 単方向データフロー 純粋な関数の多用 Action Actionは起こったイベントを表す interface PayloadAction<P, T extends string, M, E> { type: T; payload: P; meta: M; error: E; } action.type - Actionを識別する文字列 アクションの名前はシステムが行うことではなく実際に起こったことを書く 例) (x) 'CREATE_COMMENT' (o)'POST_COMMENT' action.payload - Actionに必要なデータ action.meta - a

                                            Reduxの個人的チュートリアル(redux-toolkitあり) - Qiita

                                          新着記事