I hereby claim:
- I am afbroman on github.
- I am afbroman (https://keybase.io/afbroman) on keybase.
- I have a public key ASBpBj6Tyd21vd4d9VJlqSeq4f4oDczv840vBXn-UHYnkgo
To claim this, I am signing this object:
| Machine( | |
| { | |
| initial: "hidden", | |
| states: { | |
| hidden: { | |
| on: { | |
| TURN_ON: "visible", | |
| }, | |
| }, | |
| visible: { |
| const displayMachine = Machine( | |
| { | |
| initial: "hidden", | |
| states: { | |
| hidden: { | |
| on: { | |
| TURN_ON: "visible", | |
| }, | |
| }, | |
| visible: { |
| const displayMachine = Machine({ | |
| initial: "hidden", | |
| states: { | |
| hidden: { | |
| on: { | |
| TURN_ON: "visible", | |
| }, | |
| }, | |
| visible: { | |
| type: "parallel", |
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
| const fetchMachine = Machine( | |
| { | |
| id: 'fetch', | |
| initial: 'idle', | |
| context: { | |
| results: [], | |
| message: '', | |
| }, | |
| states: { | |
| idle: { |
| function validate(inputs) { | |
| return { | |
| name: inputs.name.length > 3 ? null : 'Company name should be longer than 3 characters', | |
| shareholders: inputs.shareholders.map(shareholder => { | |
| return { | |
| name: shareholder.name.length > 3 ? null : 'Shareholder name should be longer than 3 characters', | |
| shares: shareholder.shares > 0 ? null : 'Shareholder should have at least one share' | |
| }; | |
| }), | |
| } |
| def stub_request | |
| faraday_stub = Faraday.new do |builder| | |
| builder.adapter :test do |stub| | |
| stub.post('/api/service', {id: '111', data: {'a': 1}}) {|env| [200, {}, mock_response]} | |
| stub.get('/api/another_service', {query: 'foo'}) {|env| [200, {}, second_mock_response]} | |
| end | |
| end | |
| Service::Something.stubs(:connection).returns(faraday_stub) | |
| end |
| import React from "react"; | |
| import { render } from "react-dom"; | |
| const ParentComponent = React.createClass({ | |
| getDefaultProps: function() { | |
| console.log("ParentComponent - getDefaultProps"); | |
| }, | |
| getInitialState: function() { | |
| console.log("ParentComponent - getInitialState"); | |
| return { text: "" }; |
I hereby claim:
To claim this, I am signing this object:
| <%= simple_form_for @form do |f| %> | |
| <%= f.input :username %> | |
| <%= f.input :birthdate, as: :date %> | |
| <%= f.button :submit %> | |
| <% end %> |