Commit Graph

6 Commits

Author SHA1 Message Date
Eloy Durán
36dc4c076c [react-relay] Propagate component props to container. 2017-02-08 13:02:17 +01:00
Eric Anderson
9b53298395 Support Pick<> on setState now that TS 2.1 is out (#13155)
* Support Partial<> on setState now that TS 2.1 is out

* Update readme to reflect setState being typed correctly

* Switch setState to Pick

* Restore cloneELement portion of readme

* Use Pick<> | S for setState due to cast issue

* state and props should be readonly

* Fix nit + document why we

* Add typescript compiler header

* Update to properly order headers

* Update readme to reflect 2.1.5 fixing stPick

* Update readme now that 2.1.5 is out

* All that depend on react now require 2.1

* Fix definition that fails due to readonly state
2017-01-23 12:36:53 -08:00
Matt Martin
df386cb566 Relay.createContainer accepts stateless components (#13383) 2016-12-27 18:51:48 -05:00
Matt Martin
d0c8f10aa1 Adding onReadyStateChange callback to setVariables
`this.props.relay.setVariables` takes an optional callback that's not currently represented in the types. Just adding that.

See this answer on StackOverflow for a high-level overview:
http://stackoverflow.com/questions/35471836/loading-indicator-after-this-props-relay-setvariables-triggered-fetch

And the docs have more detailed information about what the callback provides:
https://facebook.github.io/relay/docs/guides-ready-state.html
2016-12-08 09:31:32 -08:00
Nathan Shively-Sanders
3b5e761ce2 Merge branch 'types-2.0' into patch-2 2016-11-23 11:02:58 -08:00
Andy
8841dfc744 Use index.d.ts only (not foo/foo.d.ts) (#12834)
* Use index.d.ts only (not foo/foo.d.ts)

* Convert more packages

* Remove unnecessary references
2016-11-21 12:58:06 -08:00