これはredux-middlewaresの紹介です。
Middlewareがどのようなものかついては、非常に分かりやすい記事があるのでそれを貼っておきます。
http://qiita.com/kuy/items/57c6007f3b8a9b267a8e
僕がMiddlewareを活用するようになったのは、この記事を読んでからです。
これはredux-middlewaresの紹介です。
Middlewareがどのようなものかついては、非常に分かりやすい記事があるのでそれを貼っておきます。
http://qiita.com/kuy/items/57c6007f3b8a9b267a8e
僕がMiddlewareを活用するようになったのは、この記事を読んでからです。
| def register_handler(register_func, hander_func) do | |
| spawn_link fn -> | |
| register_func.() | |
| for :ok <- Stream.cycle([:ok]) do | |
| receive do | |
| message -> handler_func.(message) | |
| end | |
| end | |
| end | |
| end |
| Section "InputClass" | |
| Identifier "Ryo33 HHKB" | |
| MatchProduct "Topre Corporation HHKB Professional" | |
| Option "XkbModel" "pc104" | |
| Option "XkbLayout" "us" | |
| EndSection |
| defmacro defobject(definition) do | |
| quote do | |
| json = unquote(definition) |> Poison.encode! |> Poison.decode! | |
| case ExJsonSchema.Validator.validate(Zpids.Display.Object.schema, json) do | |
| {:error, x} -> | |
| raise inspect x | |
| _ -> :ok | |
| end | |
| def definition, do: unquote(definition) | |
| end |
| import React from 'react'; | |
| import { connect } from 'react-redux'; | |
| import { pageSelector } from './selectors.js'; | |
| import { taskPage, relaxPage } from './pages.js'; | |
| import TaskPage from './TaskPage.js'; | |
| import RelaxPage from './RelaxPage.js'; | |
| import ErrorPage from './ErrorPage.js'; | |
| const mapStateToProps = state => { | |
| const page = pageSelector(state); |
| mix new cizen_dining_philosophers | |
| cd cizen_dining_philosophers |
| defmodule Server do | |
| use GenServer | |
| def init(pid) do | |
| {:ok, pid} | |
| end | |
| def handle_info({:DOWN, _ref, :process, _object, _reason}, state) do | |
| {:stop, :normal, state} | |
| end |
git clone https://github.com/andytill/erlyberly.git && cd erlyberly| # This is a comment. | |
| # Allows you to use SomeModule with the long path. | |
| alias Too.Long.Path.To.SomeModule | |
| # This is needed for using macros in SomeModule. | |
| require SomeModule | |
| # Spawns a new process that prints a result of 1 + 1. | |
| spawn(fn -> |