Initial React v0.14 definitions - #6205
#6205Initial React v0.14 definitions#6205
Conversation
|
Re: deprecated, I think remove - it's embracing the inevitable. If people shout we could look at adding back. I favour breaking up the tests but I don't really mind. Monolithic is fine. |
|
For now, I'm thinking you should move the old v0.13 definitions to a separate legacy folder instead of overwriting them. I'm also for splitting the tests. |
I actually meant to put that under "Questions". We did that with v0.12, it makes sense to me as well.
One "gotcha" with the tests is #6125. Essentially if we want to split and also test both the module and the global version, we'd wind up with N modules * 2 which here = 20 test files. If we split should we forego testing the global version? Or should we just suck it up and have 20 test files? Or some other solution that I'm (hopefully) missing. |
|
@jbrantly , in this case it's probably overkill. All addons in a single file (x2) should be fine. |
There was a problem hiding this comment.
Why is this a module instead of a namespace?
There was a problem hiding this comment.
I think you're right, it should be namespace.
|
I think that we should remove the deprecated items as well. @jbrantly, what is the best way to help out? |
I've given you collab access to my fork so you can push to this PR if you want. Feel free to take anything on the list, I haven't had a chance to do anything more yet. |
|
Thanks! |
|
I just rebased on top of master to pull in #6236. I'm going to start working on some of the various items that were commented on. |
|
I've addressed the various comments in the thread so far:
Plenty of stuff still left to do though. |
|
Good work! |
|
👍 |
|
travis ci failed. please merge master into this branch. |
|
@vvakame This is still a WIP and the tests haven't been updated yet 😄 That's why travis is failing. I'll ping when everything is done and ready to be merged. |
|
I'm curious about how we're going to do stateless function components. They don't seem like they would have an obvious type signature except for |
|
@pspeter3 According to this ticket, it doesn't look like function components are going to be supported by TypeScript yet: microsoft/TypeScript#4861 |
|
@dallonf FWIW I intend to address microsoft/TypeScript#4861 this week |
|
@RyanCavanaugh that is excellent news! Looking forward to it. |
|
valueLink support should also be added to HTMLAttributes to support LinkedStateMixin. |
|
@jbrantly looks like we're done with the remaining tasks except for CSSTransitionGroup updates and testing. I've already been adding tests as I go. Do you know what still needs to be tested? |
|
@vsiao Awesome! I just finished up the CSSTransitionGroup update and also fixing dependency tests. My "Test, test, test" comment was more about upgrading real-world applications and not so much the unit tests, but I'm not sure if that's practical. I've removed that item. There is only one remaining item I think related to the |
|
Done! Passing tests finally 😄 |
|
OK! I think everything is done and ready to be merged! |
Initial React v0.14 definitions
|
Merged - well done! |
|
Thanks for driving this @jbrantly |
|
Thanks to everyone involved. Very much appreciated. |
|
Yup, thanks to everyone who contributed with code or comments! |
|
Thank all of you so much for all your hard work on this! |
|
thanks all 🌟 will start testing these definitions soon! |
|
Amazing work, thank you so much everyone! |
|
Thank you for the great work! |
|
Thanks all for your hard work on this. We've been using these while they have been in progress, and so far no problems at all. |
|
I have an issue using ES6 module syntax in TypeScript/Visual Studio 2013. import * as update from 'react-addons-update';error: "Module react-addons-update resolves to a non-module entity and cannot be imported using this construct" import update = require('react-addons-update');No error. Do I have to use this syntax? I'm using es6 syntax everywhere else. :( |
|
tl;dr: you have to use
|
|
This happening because of typescript union type spec:
Instead of using union type, there should be intersection type, which completely fits to this case:
So, there should be |
This is a
WIPPR for React v0.14 definitions. This supercedes and incorporates feedback from #5828Things done:
react-domandreact-addons-*react-domandreact-dom/serverand removed those fromreactbatchedUpdatesaddon tounstable_batchedUpdatesunstable_renderSubtreeIntoContainerversionreact/addons(yay!!)initializeTouchEventsclassSetsetPropsandreplacePropssince they're deprecatedgetDOMNodesince it's deprecatedcloneWithPropssince it's deprecatedreact-global.d.tsto pull in definitions from the various addon definitions files instead of duplicatingreact-domfolder based on discussion in Add module react-dom #5828refbehavior for DOM elements - done by @vsiaoI've also not addressed updates to elements/attributes. I plan to make a thorough update to these at a later date.@vsiao did thisQuestions:
removed per discussioncloneWithPropsaddon is deprecated. Should we just remove it?I've removed other deprecated items already since TS doesn't really have a way to show that something is deprecated but it's useful to use TS when upgrading. Others might feel differently.Should we make individual test files for each addon definition or keep a monolithic test file like today? I'm thinking monolithic but would like opinions. One thing to keep in mind is Proposal: guidance on modules/globals #6125.seems like we've gone monolithic for nowShould we put the existing v0.13 definitions in a legacy folder?added using DT conventionsIf anyone wants collab on my fork to help out just ask.
Not sure who all is interested in this so I'm just going to ping everyone who has had passing interest in the past: @pspeter3 @vsiao @basarat @johnnyreilly @RyanCavanaugh @ngbrown @B-Stefan @use-strict