I hereby claim:
- I am danott on github.
- I am danott (https://keybase.io/danott) on keybase.
- I have a public key ASBbSv8_mpTXYuH9FlG3Q4Xmcef5dk2ocfVF8HRk8KyfBwo
To claim this, I am signing this object:
| <% content_for :content_set_within_partial do %> | |
| "Hello! I'm setting a content_for block within a partial" | |
| <% end %> | |
| Hello!, I'm actually rendered in the partial |
| class CanResetChildren extends React.Component { | |
| constructor(props) { | |
| super(props) | |
| this.state = this.initialState | |
| window.setTimeout(this.reset.bind(this), 60000) | |
| } | |
| render() { | |
| return ( | |
| <div> |
| var stripAnsi = require('strip-ansi'); | |
| var RequestShortener = require('webpack/lib/RequestShortener'); | |
| var requestShortener = new RequestShortener(process.cwd()); | |
| function formatError(e) { | |
| var showErrorDetails = true; | |
| var text = ''; | |
| if (typeof e === 'string') { | |
| e = { | |
| message: e, |
| const Name = React.createClass({ | |
| render() { | |
| const { first, last } = this.props | |
| const name = `${first} ${last}` | |
| return ( | |
| <div>Your full name is {name}</div> | |
| ) | |
| } | |
| }) |
| React.creatClass({ | |
| render() { | |
| return ( | |
| <form onSubmit={handleSubmit}> | |
| <input | |
| type="submit" | |
| value={this.state.loading ? "Doing it..." : "Do it!"} | |
| disabled={this.state.loading} | |
| /> | |
| </form> |
I hereby claim:
To claim this, I am signing this object:
| <div id="person_form"></div> | |
| <script> | |
| ReactDOM.render( | |
| React.createElement(PersonForm, <%= @person.to_json.html_safe %>), | |
| document.getElementById("person_form") | |
| ) | |
| </script> |
| module.exports = function(fileInfo, api) { | |
| var j = api.jscodeshift; | |
| var out = j(fileInfo.source) | |
| .find(j.Literal) | |
| .forEach(function (path) { | |
| // Only consider literals that start/end w/ double quotes | |
| if (!/^'.*'$/.test(path.value.raw)) { | |
| return; | |
| } |
| -const Something = ({ name }) => { | |
| - const localAction = () => console.log(name) | |
| +const Something = React.createClass({ | |
| + propTypes: { | |
| + name: React.PropTypes.string.isRequired | |
| + }, | |
| - return <div onClick={localAction}>Log {name}</div> | |
| + localAction() { console.log(this.props.name) }, | |
| + |
| func any<S>(source: [S], predicate: (S) -> Bool) -> Bool { | |
| for element in source { | |
| if predicate(element) { return true } | |
| } | |
| return false | |
| } | |
| func any<S>(source: [S], predicate: (Int, S) -> Bool) -> Bool { | |
| for (index, element) in enumerate(source) { |