サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
世界禁煙デー
gist.github.com/sebmarkbage
WhyReact.md I heard some points of criticism to how React deals with reactivity and it's focus on "purity". It's interesting because there are really two approaches evolving. There's a mutable + change tracking approach and there's an immutability + referential equality testing approach. It's difficult to mix and match them when you build new features on top. So that's why React has been pushing a
The Rules.md The Rules of React All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it. What Functions Are "Pure"? A number of methods in React are assumed to be "pure". On classes that's the const
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.
Enhance.js 0� ��U p� ��U import { Component } from "React"; export var Enhance = ComposedComponent => class extends Component { constructor() { this.state = { data: null }; } componentDidMount() { this.setState({ data: 'Hello' }); } render() { return <ComposedComponent {...this.props} data={this.state.data} />; } }; HigherOrderComponent.js @�؈�U import { Enhance } from "./Enhance"; class MyCompone
JSXSpreadAttributes.md JSX Spread Attributes If you know all the properties that you want to place on a component a head of time, it is easy to use JSX: var component = <Component foo={x} bar={y} />; Mutating Props is Bad, mkay If you don't know which properties you want to set, you might be tempted to add them onto the object later: var component = <Component />; component.props.foo = x; // bad c
ElementFactoriesAndJSX.md New React Element Factories and JSX In React 0.12, we're making a core change to how React.createClass(...) and JSX works. If you're using JSX in the typical way for all (and only) React components, then this transition will be seamless. Otherwise there are some minor breaking changes described below. The Problem Currently var Button = React.createClass(...) does two thin
react-terminology.md React (Virtual) DOM Terminology In React's terminology, there are five core types that are important to distinguish: ReactElement / ReactElement Factory ReactNode ReactComponent / ReactComponent Class React Elements The primary type in React is the ReactElement. It has four properties: type, props, key and ref. It has no methods and nothing on the prototype. You can create one
このページを最初にブックマークしてみませんか?
『gist.github.com』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く