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
It's that time of year again! The weeds are growing, the air is thick and stagnant, and I just deployed another refactoring of my blog. "Why does he keep working on his blog," you're thinking, "when I could do all of that with a static-site generator like Jekyll?" Writing my own blogging engine has been one of the best decisions I've made. Having a side project that I actually use and get value fr
This blog post shows how you can use a tagged template to log variables more efficiently. In order to understand it, you should be familiar with ECMAScript 6 template literals and tagged templates. For an introduction, consult chapter “Template literals and tagged templates” of “Exploring ES6”. The problem: redundancy # If you want to log both name and value of a variable in a traditional manner,
Many sites and apps have a lot of scripts to execute. Your JavaScript often needs to be run as soon as possible, but at the same time you don’t want it to get in the user’s way. If you send analytics data when the user is scrolling the page, or you append elements to the DOM while they happen to be tapping on the button, your web app can become unresponsive, resulting in a poor user experience. Th
2015-08-28 11:06 合成された初期状態ツリーの出力結果を追加 分割されたreducerの初期状態ツリー Reduxの原則の1つであるグローバルな状態ツリーがすべてのソースとなるという点。 理屈ではわかるんだけど、いくつかコンポーネントを作っていくと常に大きなツリーが渡されるってのがとても扱いづらく感じる。つまり、何かアクションを受け取ってそれを状態ツリーに反映させるとき、ほとんどのケースにおいてツリーの一部だけを更新して、それ以外はいじらないことが多いからだ。 Reduxリポジトリのasyncのサンプルコードを追っていくと、reducers/index.jsの部分がよくわからなかった。 他のサンプルだと初期状態ツリーは定数として定義してreducerのデフォルト引数に指定していることが多かったが、asyncではまずそれがない。 そしてなにより状態ツリーはグローバルなものが1つ
var table = new SmartTableScroll({ // DOM element to render to el: document.querySelector('#some-table'), // Array of objects that will be used to build and update each row data: [ { row1Data }, { row2Data } ... ], // Function used to calculate the height of each row heightFn: function(rowData) { return rowData.hasPicture ? 20 : 10; }, // Used when first creating dom nodes for each row buildRow: f
This post is a non-exhaustive quick overview of the so-called “unidirectional data flow” architectures. Not meant to be taken as a beginner tutorial, but rather as an overview of their differences and peculiarities. At the end, I’ll introduce a new architecture which deviates significantly from the others. This post assumes client-side Web UI frameworks only. TERMINOLOGY It would be confusing to t
facebook/flux 2.1.0からFlux UtilsというStoreなどの実装が含まれるようになりました。 今回Flux Utilsを使って、指定したアカウントのはてなブックマークを検索するウェブアプリを書いてみました。 azu/hatebu-mydata-search azu.github.io/hatebu-mydata-search/ mydataのAPIがCORS対応してないのでJSONProxyを挟んでます。(なのでブックマークデータが多いアカウント名は避けたほうが…) これを作ってみてFlux Utilsについて思ったことを書いていきます。 Flux Utilsの紹介ページに、Flux Utilsの解説が書かれています。 簡単にまとめると以下の4つのクラスがFlux Utilsとして提供されています。 Store ベースとなるクラス ReduceStore Store
Beautiful JavaScriptThis is an excerpt from Beautiful JavaScript, a book edited by Anton Kovalyov and published by O’Reilly. Functions are first-class citizens, syntax resembles Java, inheritance is prototypal, and (+””) equals zero. This is JavaScript, arguably the most polarizing and misunderstood programming language in the world. It was created in 10 days and had a lot of warts and rough edges
When you have key-value data whose keys you don’t know in advance, it’s generally better to store it in an ES6 Map than in an object. But how do you convert Maps to and from JSON? This blog post tells you. Background knowledge: Maps: chapter “Maps” of “Exploring JavaScript” JSON: chapter “Creating and parsing JSON” of “Exploring JavaScript” Arbitrary Maps as JSON via Arrays of pairs # If a Map co
Vue.js shares similar concepts to other popular JavaScript frameworks like Rivet.js, Ractive.js, Angular.js, and Knockout.js. These types of frameworks offer a structural outline for interactive web applications. Raw HTML acts as the templating language, while these frameworks extend the syntax to provide data binding and User Interface data modeling. Vue.js strives to make working with these type
Angular JSapplications with ES6 modulesTesting of Angular JS application used to be quite painful especially when using “official” solutions like Karma or Protractor. ES6 (aka ES2015, aka new Javascript release) changed this by introducing standardized module syntax. This enables us to do real unit testing of Angular JS constructs like controllers, factories or services in a very simple and fast f
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く