- React - http://reactjs.com
- Flux - https://facebook.github.io/flux/
- Redux - http://redux.js.org
- Getting started with Redux - http://redux.js.org/docs/introduction/Ecosystem.html
- Keep components stateless - https://facebook.github.io/react/docs/interactivity-and-dynamic-uis.html#what-components-should-have-state
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useState } from 'react' | |
import { animated, useSpring } from 'react-spring' | |
function useSpringWithRestPromise(options) { | |
let animation | |
const promise = new Promise((resolve, reject) => { | |
animation = useSpring({ | |
...options, | |
onRest: () => options.onRest && options.onRest(resolve, reject) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useCallback, useMemo, useState } from 'react' | |
import styled from 'react-emotion' | |
import ResizeObserver from 'react-resize-observer' | |
export default function AnimateAutoHeight({ children }) { | |
const [height, setHeight] = useState('auto') | |
const onResize = useCallback( | |
({ height: newHeight }) => setHeight(newHeight), | |
[setHeight] | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am msaspence on github. | |
* I am msaspence (https://keybase.io/msaspence) on keybase. | |
* I have a public key whose fingerprint is CD5E AB92 0F33 E380 BA96 3B4E 3CEC 47D8 8BBF 0AFC | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
if (global.Turbolinks === undefined) { | |
throw "Missing Turbolinks dependency. TurboReact requires Turbolinks be included before it."; | |
} | |
var HTMLtoJSX = require("htmltojsx"); | |
var JSXTransformer = require("react-tools"); | |
var React = require("react"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Roadie | |
module ActionMailer | |
module Automatic | |
def mail(*args, &block) | |
super.tap do |email| | |
binding.pry | |
email.extend ::Roadie::Rails::InlineOnDelivery | |
email.roadie_options = roadie_options.try(:dup) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Chosen, a Select Box Enhancer for jQuery and Prototype | |
// by Patrick Filler for Harvest, http://getharvest.com | |
// | |
// Version 0.9.15 | |
// Full source at https://github.com/harvesthq/chosen | |
// Copyright (c) 2011 Harvest http://getharvest.com | |
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md | |
// This file is generated by `cake build`, do not edit it by hand. | |
(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Action < ActiveRecord::Base | |
include OpenGraph | |
include Activity | |
default_scope where(pending: false, archived: false) | |
scope :pending, where(pending: true, archived: false) | |
attr_accessible :title, :summary, :description, :user_id, :image, :fund_ceiling, :participation_target_count, :campaign_id, :cause_id, :featured, :poll_options, :poll_options_attributes, :pending, :archived, as: :admin | |
attr_accessible :title, :summary, :description, :image, :poll_options_attributes |