並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 46件

新着順 人気順

immutable.jsの検索結果1 - 40 件 / 46件

  • さいきんReact, Reduxでやっている設計 - しゅみは人間の分析です

    はじめに ブラウザでGUIアプリケーションを作らなくても良い牧歌的な時代は終わりつつあります。個人的な意見としてはブラウザはドキュメントビューアのままでいて、複雑なGUIアプリケーションはネイティブアプリケーションとして実装されてほしいのですが、そうは言ってもお仕事で人間にとって負担の低いUIを作っていく必要があるのです。 Railsでサーバアプリケーションを書きつつ管理画面はネイティブでなんてことはコスト的に実現できません。かといって長期的に運用されるシステムを作ると、システムを運用するためのUIが操作しやすいに越したことはありません。Bootstrapを使っててきとうなフォームを並べただけの画面を作って怒られた経験はありませんか? たとえサーバ開発者だとしても、我々は使いやすいUIを求め続ける必要があります。 react, redux 複雑なGUIを作るためのフレームワークも乱立の時代

      さいきんReact, Reduxでやっている設計 - しゅみは人間の分析です
    • React使い必見! Immutable.jsでReactはもっと良くなる | Wantedly Engineer Blog

      Reactを導入して半年近くが経ちましたWantedlyでは、今年の初めからReact(+Redux)の導入に取り組み始めたので、気付けば半年近く立っていることになります。今自分がこの記事を書いているエディタから、Wantedly Adminのチケット画面まで、ある程度大きなアプリケーションを開発してきました。 そこで今回は、チームで継続的に開発していく過程で遭遇した問題と、それを解決するために導入したImmutable.jsについて紹介します。 増え続けるCallbackとAction、肥大化するStoreReactとセットで語られることが多いFluxアーキテクチャ。ここでは詳しい説明は省略しますが、とてもシンプルな考え方なので、チュートリアルなどで簡単に学ぶことができます。しかし、実際にチームで開発していくと、たしかに動いてはいるけど、綺麗とは言い難いコードが増えてしまいました。 Ac

        React使い必見! Immutable.jsでReactはもっと良くなる | Wantedly Engineer Blog
      • Reduxのパターンとアンチパターン | POSTD

        Redux は、 Flux のようなアーキテクチャを使用してアプリケーションの状態を管理できる非常にシンプルなライブラリです。私たち Affirm では今、 Reduxのタイムトラベル機能 に注目しています。Affirmの主要事業は、透明性の高い消費者ローンを提供することなので、ローン申し込み時の全過程をユーザ視点で再現できると非常に有用なのです。 Reduxはフレームワークというよりも、パターンの適用に役立つ関数セットです。よって、適切なパターンを慎重に適用しないと、Reduxを使ったことを後悔する結果になりかねません。この記事では、Affirmで確立したReduxのベストプラクティスや、ミスを犯しやすいポイントについて説明します。 ImmutableJS ImmutableJS は、不変の永続データ構造を扱うためのライブラリです。私たちがこのライブラリを好んで使う理由は2つあります。

          Reduxのパターンとアンチパターン | POSTD
        • Angular 2アプリケーションをimmutable.jsとReduxで構築する | POSTD

          過去にJavaScript開発をやったことがある人であれば、 Redux のことは聞いたことがあるでしょう。Reactとともに一般に普及し、開発者の中には「当時のJavaScript関係で一番興奮した出来事だった」、「アプリケーションの構築に大変革をもたらした」、はては「Reduxのおかげで地球温暖化が完全に止まった」と言う人もいるくらいです。 失礼、ちょっと我を忘れてしまいました。しかし、真面目な話、Reduxはアプリケーションの構築方法に、変化をもたらしたのは本当です。この投稿では、Reduxを別のライブラリの Immutable.js と一緒に、Angular 2と統合するやり方をご説明します。 概要 この投稿では、FluxアーキテクチャとReduxの基本的な概念を考えていきます。それから、簡単な連絡先リストのアプリケーションを段階的に作っていきます。初めは基本的なセットアップを構築

            Angular 2アプリケーションをimmutable.jsとReduxで構築する | POSTD
          • Wantedlyの最近のReact事情についてMeguro.es #3で発表しました! - Wantedly Engineer Blog

            目黒界隈のJavaScriptを書くエンジニアがあつまる勉強会、 “Meguro.es #3 in Drecom”に参加してきました。 会場はドリコムさんのオフィス内のカフェのようなスペースで、お酒を飲みつつ、ゆるやかで居心地良い雰囲気でした。 Wantedlyからは高松と森脇の2人で最近のWantedlyのフロントエンド開発で使っているツールやライブラリの話をしました。 WantedlyにReact + Reduxを導入した話 Wantedlyのこれまでのフロントエンド開発の歴史と、既存のRailsプロジェクトにReact + Reduxを導入した方法について話しました。 Immutable.jsとReact @Wantedly ~入門編~ Facebookが開発している不変オブジェクトライブラリの Immutable.jsの特徴や、Wantedlyでの活用例についての発表です。 We

              Wantedlyの最近のReact事情についてMeguro.es #3で発表しました! - Wantedly Engineer Blog
            • Draft.js

              Extensible and CustomizableWe provide the building blocks to enable the creation of a broad variety of rich text composition experiences, from basic text styles to embedded media. Declarative Rich TextDraft.js fits seamlessly into React applications, abstracting away the details of rendering, selection, and input behavior with a familiar declarative API. Immutable Editor StateThe Draft.js model is

              • Immutable.jsを色々触ってみました - Qiita

                immutable.jsは、facebook社が作っているJavaScriptのライブラリでimmutableなコレクションを提供してくれます。List, Stack, Map, OrderedMap, Set, OrderedSet and Recordがあるとのこと。 関数型言語にインスパイアされて作っているらしいので、関数型に馴染みのある関数が出てきて嬉しいです。 他にも、正格でなく遅延評価してくれるという点も嬉しいですね。 インストール

                  Immutable.jsを色々触ってみました - Qiita
                • JavaScript で クラスベースの設計より関数指向の実装を薦める理由 + GraphQL について - mizchi's blog

                  最初に: 「Functional Programming 最高!」という話ではないです JSは通信やストレージに保存するデータの扱いの関係で、JSONにシリアライズできることが至上命題になるケースが多いので、クラスベースの設計で自身に副作用を起こすメソッドより、イミュータブルな T => T なstatic methodとして切り離しておくと扱いやすいケースが多い— 現場の声 (@mizchi) 2016年9月6日 複雑なオブジェクトのシリアライズは簡単だけど、逆にシリアライズされたオブジェクトからビルダを構築するのが難しいので、JSONの構造体自身とは別に独立して独立したメソッドとしてビルダが切り離されている方が扱いやすい— 現場の声 (@mizchi) 2016年9月6日 一応コンストラクタ名を保存してシリアライズ/復元する方法はあって、RPGツクールMVのコードを読むとそういう感じに

                    JavaScript で クラスベースの設計より関数指向の実装を薦める理由 + GraphQL について - mizchi's blog
                  • Rx.js, Immutable.js について - mizchi's blog

                    自分はImmutable.jsとRxをなぜ採用しなかったか、自分の考えを整理するために書き出してみる。 僕の理解が及んでいない無知のゆえのアレもあると思うので間違っていたら罵倒ブコメお願いします。 Immutalbe(.js) 扱う対象をイミュータブルにするのはたぶん間違いなく正しい。正しいが、現時点のエコシステムにおいてその必要性を示せてない。具体的に言うと、Immutable.jsの110kbのオーバーヘッドの配信負荷、読み込み負荷、開発者の学習コストを支払ったとき、それに見合う価値を提示できているのか?にまだ疑問が残る。 PureなJSでも、ただ単に目的のデータを作るだけなら、ほとんどのケースで組み込みのarray.mapとObject.assign(またはそのポリフィル)で代用できる。(勿論生成したオブジェクトに副作用を加えないことが前提になるが) あと型がない環境でImmutab

                      Rx.js, Immutable.js について - mizchi's blog
                    • Immutable.js

                      Immutable collections for JavaScript Immutable data cannot be changed once created, leading to much simpler application development, no defensive copying, and enabling advanced memoization and change detection techniques with simple logic. Persistent data presents a mutative API which does not update the data in-place, but instead always yields new updated data. Immutable.js provides many Persiste

                      • フロントエンド・バリデーション

                        WEBエンジニア勉強会 #03

                          フロントエンド・バリデーション
                        • Immutable.jsでJSでも不変データ構造を扱う - Qiita

                          ClojureやHaskellのような不変データ構造体のJS実装です。facebook製。 不変データ構造の特徴として、元のデータ構造は不変です。 Immutable = require 'immutable' map1 = Immutable.Map a: 1, b: 2 # => Map {a: 1, b: 2} map2 = map1.set a: 3 #=> Map {a: 3, b: 2} map3 = map1.update (val) -> {foo: val.a} #=> Map {foo: 1} Mapの他に、List, OrderedMap, Set, OrederedSet, Seq, Range, Record, Stack等があります。内部的にはトライ木になっています。 面白いのはSeqやRangeで、filter関数やmap関数を与えても、getで呼ばれるまで遅

                            Immutable.jsでJSでも不変データ構造を扱う - Qiita
                          • Immutable App ArchitectureについてのTalkを観た

                            Render 2016 - Lee Byron from White October on Vimeo. https://vimeo.com/166790294 http://2016.render-conf.com/talks.php#immutable-user-interfaces Dan AbramovもReact EuropeのQ&AでおすすめしていたTalkで、改めて見て面白い内容だったので紹介します。 FacebookがReactやGraphQL、Immutable.jsを使ってどのようなアーキテクチャでアプリケーションを作成しているのかということを解説したTalkです。 特にFluxのような新しい概念が提唱されているわけではありませんが、最近のフロントエンドの流れやFacebookが目指しているものがわかりやすく解説されています。 Architectureの話が中心で各ライ

                              Immutable App ArchitectureについてのTalkを観た
                            • Re: Rx.js, Immutable.js について - saneyuki_s log

                              Rx.js, Immutable.js について - mizchi's blog ファイルサイズへの異論は無い。これを使わずとも解決できる問題があるというのも同意する。それでもイマイチ釈然としない。「使う必要のない」一般公理と「使いたくはない」私情の境界が曖昧に感じてしまう。仕方がないので反論を兼ねた個人の雑感を書いてみる。いわゆる、「ついカッとなってやった」に近い。 RxにせよImmutableJSにせよ、この手の標準データ構造を提供するライブラリは基盤性が強いので、全体的使うことでバイナリサイズに見合っただけの成果をもたらす系のライブラリに区分される。そのため、局所的に使いたい場合はあまり意味がない。この辺りはReactと類似してる面がある。 使うなら上から下まで、 あるいはオニオンアーキテクチャ的な例えで言うならある階層から外側のインターフェースを統一するようにしないと、さして美味し

                                Re: Rx.js, Immutable.js について - saneyuki_s log
                              • Immutability in JavaScript — SitePoint

                                Immutability is a core principle in functional programming, and has lots to offer to object-oriented programs as well. In this article, I will show what exactly immutability is all about, how to use this concept in JavaScript, and why it’s useful. What is Immutability? The text-book definition of mutability is liable or subject to change or alteration. In programming, we use the word to mean objec

                                  Immutability in JavaScript — SitePoint
                                • Immutable.js

                                  Immutable collections for JavaScript Immutable data cannot be changed once created, leading to much simpler application development, no defensive copying, and enabling advanced memoization and change detection techniques with simple logic. Persistent data presents a mutative API which does not update the data in-place, but instead always yields new updated data. Immutable.js provides many Persiste

                                  • Optimizing Performance – React

                                    These docs are old and won’t be updated. Go to react.dev for the new React docs. These new documentation pages teach modern React: memo: Skipping re-rendering when props are unchanged Internally, React uses several clever techniques to minimize the number of costly DOM operations required to update the UI. For many applications, using React will lead to a fast user interface without doing much wor

                                      Optimizing Performance – React
                                    • http://post.simplie.jp/posts/81

                                        http://post.simplie.jp/posts/81
                                      • GitHub - scottcorgan/immu: A TINY, fail-fast, lazy, immutable Javascript objects 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 - scottcorgan/immu: A TINY, fail-fast, lazy, immutable Javascript objects library.
                                        • React.js Conf 2015 - Immutable Data and React

                                          Lee Byron, Facebook Immutable data unlocks powerful memoization techniques and prohibits accidental coupling via shared mutable state. It's no accident that these are the the same benefits provided by React. Persistent data structures provide the benefits of immutability while maintaining high performance reads and writes and present a familiar API. Learn about how persistent immutable data str

                                            React.js Conf 2015 - Immutable Data and React
                                          • immutableのメリットとImmutable.jsでのModel定義 - コネヒト開発者ブログ

                                            こんにちは。フロントエンジニアの安達 (@ry0_adachi) です。 気付いたら前回の私の記事から2ヶ月が経ちました。時間の流れは早いですね...。 さて、今回はimmutableとそれをJSで実現するためのImmutable.jsについてです。 この記事を通して沢山の方にimmutableについて知ってもらえると嬉しいです。 immutableとは immutableは元となっているオブジェクトに変更を加えない、加えられない状態です。 また、変更を加える、加えられることをmutableと呼びます。 immutableの例 JSで配列に値を追加する際に let list = [1, 2] list.push(3) とやるとlistに3が追加されます。 これは元となっているlistに対して3を追加するという変更を加えているのでmutableです。 しかし、これをImmutable.jsの

                                              immutableのメリットとImmutable.jsでのModel定義 - コネヒト開発者ブログ
                                            • ReactとImmutable.jsで関数型を体験してみて思ったこと #scripty06

                                              2016/9/14の勉強会にて発表された資料です。 SCRIPTY#6 ~フロントエンド紳士・淑女のための勉強会~ http://scripty.connpass.com/event/38935/Read less

                                                ReactとImmutable.jsで関数型を体験してみて思ったこと #scripty06
                                              • React/Redux 使ってみての勘所 - memo_md

                                                前回のエントリでは、React/Redux/ES6のざっくりとした感想をまとめました。 mugi1.hateblo.jp 今回はその続きということで、React/Redux利用時において、 こうすればよかった!! こうすべきじゃなかった・・ といったところをまとめてみたいと思います。 Immutable.js は使ったほうが幸せになれた https://facebook.github.io/immutable-js/ javascriptで不変データ構造を提供してくれるライブラリ。(by facebook) これによって解消される問題が多数。 構造がネストした場合の更新が簡単に 「そもそもネストしないような構造にしろよ」という話なのですが、 大人の事情でネストせざるを得ないときもあります。 ネストしたstoreの場合、action経由で深い階層の値を更新したい場合に結構な手間になります。

                                                  React/Redux 使ってみての勘所 - memo_md
                                                • JavascriptでRubyのRange#to_aのような配列を返す方法 - rochefort's blog

                                                  20140115 ES6記法を追加(from jserさん) RubyではRangeオブジェクトは便利なのでよく使います。 >> (1..10).to_a => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] Javascriptだと Javascriptでも同じようなものが無いのか探してみると、いくつかありました。 1. forで回してArray.push とりあえず普通に書いてみました。 function range(from, to) { var ar = []; for (var i=from; i <= to; i++) { ar.push(i) } return ar; } range(1,10) => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] 2. Underscore.js range を使う もっとsmartな方法はないかと調べたら

                                                    JavascriptでRubyのRange#to_aのような配列を返す方法 - rochefort's blog
                                                  • Immutability in React — SitePoint

                                                    In my previous article I wrote about the hows and whys of immutability. I argued that one area where immutability truly shines is in tracking changes, one of the big challenges in modern front-end frameworks. In this article I will give you an example of how immutability can be used with React, a library developed by Facebook. This article won’t discuss the basic of React. If you need an introduct

                                                      Immutability in React — SitePoint
                                                    • How to use Immutable.js Records with React and Redux

                                                      It’s the small things that change your product. React and Flux can be small things, but using them has changed our product like we could never imagined. As we continue to improve our app, we struggled with the lack of consistency in our models, even if they were immutable. They were generic types (i.e. Map, Array), so we couldn’t precisely validated propTypes given to our components. 🌀 As Immutab

                                                      • How to Build a Todo App Using React, Redux, and Immutable.js

                                                        The way React uses components and a one-way data flow makes it ideal for describing the structure of user interfaces. However, its tools for working with state are kept deliberately simple — to help remind us that React is just the View in the traditional Model-View-Controller architecture. There’s nothing to stop us from building large applications with just React, but we would quickly discover t

                                                          How to Build a Todo App Using React, Redux, and Immutable.js
                                                        • Immutable Data Structures and JavaScript

                                                          A little while ago I briefly talked about my latest blog rewrite and promised to go more in-depth on specific things I learned. Today I'm going to talk about immutable data structures in JavaScript, specifically two libraries immutable.js and seamless-immutable. There are other libraries, but the choice is conceptually between truly persistent data structures or copying native JavaScript objects,

                                                          • Redux + immutable.js- Record - - DeNA Design

                                                            immutable.js Advent Calendar 2017 2 日目の投稿です。「Redux に immutable.js を導入すると良いらしいが、まだ利用したことがない」という方向けの内容になります。「Reducer の Object.assign が手短に書ける便利ライブラリ」と認識されている方もいるかもしれません。immutable.Record は、immutable な collection を保持する Object に関数を付与することができ、モデルとして利用することが可能です。 React 状態管理の定番感が強い Redux は、その他にも多くの View ライブラリでバインディングがあります。View フレームワーク非使用のページでも、Redux を導入する価値は大きいです。しかし通常の ReduxStore の中身は巨大な json に過ぎず、MVVM アーキテ

                                                              Redux + immutable.js- Record - - DeNA Design
                                                            • GitHub - ericelliott/irecord: An immutable store that exposes an RxJS observable. Great 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 - ericelliott/irecord: An immutable store that exposes an RxJS observable. Great for React.
                                                              • https://morizyun.github.io/blog/node-js-npm-library-immutable-js/index.html

                                                                  https://morizyun.github.io/blog/node-js-npm-library-immutable-js/index.html
                                                                • Immutable.jsとReact @Wantedly ~入門編~

                                                                  WantedlyでReactとImmutable.jsをどう使っているか

                                                                    Immutable.jsとReact @Wantedly ~入門編~
                                                                  • GitHub - planttheidea/crio: Immutable objects and arrays in a natural way

                                                                    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 - planttheidea/crio: Immutable objects and arrays in a natural way
                                                                    • ReduxにImmutable.JSを適用してみた - Qiita

                                                                      はじめに この記事はDMM.com #1 Advent Calendar 2017 の12/13の記事です。 Immutable.JSを使って、React+Redux製WebアプリのReducerをすっきりさせた方法と結果、及び注意点についてまとめました。 目的 Immutable.JSとは、Facebookが開発した、不変であるデータ構造を扱うためのJavaScriptライブラリです。 開発中だったReact+Reduxアプリでは、開発を進めれば進めるほど、ActionとReducerが肥大化し、改修がしづらくなっていました。 (Reducer内にロジックが含まれていたり、冗長な...stateを書く必要があったり…etc。) 今回は、Immutable.JSを使って、Reducerの肥大化を防ぎ、保守性・改修性を上げることを目的とします。 方法 今回は一般的なReact+Reduxアプ

                                                                        ReduxにImmutable.JSを適用してみた - Qiita
                                                                      • Immutable.js, persistent data structures and structural sharing

                                                                        Treating your data as immutable brings many benefits. In fact, that’s a principle behind React: React elements are immutable. You might also be interested in learning about an Immutable App Architecture. But what’s the benefit of using Immutable.js: function toggleTodo (todos, id) { return todos.update(id, (todo) => todo.update('completed', (completed) => !completed ) ) }…over using normal JavaScr

                                                                          Immutable.js, persistent data structures and structural sharing
                                                                        • Immutable.js 101 – Maps and Lists - Thomas Tuts

                                                                          I’ve been using Immutable.js a lot lately for my React/Redux projects. Immutable.js greatly simplifies how you think about your application’s state. Since you should never mutate your state in Redux reducers, using a library like Immutable.js is a great choice to make things a little more pleasant for yourself when dealing with complex state data. In this blogpost, I’ll talk about the two most com

                                                                          • 【Immutable.jsの使い方】Immutable.js超入門~ReactでsetStateのプロパティ値に直接代入避ける~ | 武骨日記

                                                                            毎日朝7時更新/プログラミング芸人/WEBデザイン/フォトグラファー/インド/JavaScript芸人/Reactエンジニア

                                                                              【Immutable.jsの使い方】Immutable.js超入門~ReactでsetStateのプロパティ値に直接代入避ける~ | 武骨日記
                                                                            • Immutable as React state

                                                                              This is a contrived example of using Immutable structures as React state. This example assumes React v0.13 or higher. v0.13 provides the functional setState API and allows for Iterables to be used as React children. This example also uses some ES6 features (destructuring, and arrow functions). Note that state must be a plain JS object, and not an Immutable collection, because React's setState API

                                                                                Immutable as React state
                                                                              • ES6のconstを使い倒すレシピ3 - immutable.js編 〜 JSおくのほそ道 #036 - Qiita

                                                                                こんにちは、ほそ道です。 Object.freeze編でやったようにオブジェクトの状態を完全に凍結させたい場合はfreezeしてしまえばよいのですが、アプリケーションを作っていると当然、拡張/変更が必要になるシチュエーションは出てくると思います。 今回はライブラリを使って不意なデータ変更によって生まれる複雑性に対抗する方法を紹介していきます。 1.前提共有編 2.Object.freeze編 4.コレクション一発代入/一発返却編 5.条件分岐一発代入/一発返却編 目次はこちら const宣言したオブジェクトの不変性を保ちながら変更に対応する 前回、deepFreezeという関数を作るときに、freezeされた新しいオブジェクトを生成して返すようにしましたが、そのようにして破壊的メソッドを使用せずに、変更を加えた新しいオブジェクトを返す、というようにするのが拡張/変更による想定外を生まないた

                                                                                  ES6のconstを使い倒すレシピ3 - immutable.js編 〜 JSおくのほそ道 #036 - Qiita
                                                                                • seamless-immutableのすすめ / Introduction of seamless-immutable

                                                                                  Immutable.js, Moriとの比較 seamless-immutableをすすめる理由 seamless-immutableの概要 ベンチマーク(JavaScript, Immutable.js, Mori, seamless-Immutable)

                                                                                    seamless-immutableのすすめ / Introduction of seamless-immutable