-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v5 release chores #473
Comments
I already updated the code linting (#461), so that's taken care of. I intentionally didn't use airbnb because I didn't want to change styles just for the sake of changing styles. Flow and Typescript typings both have PRs open (#389 and #433) respectively. They have atrophied, but I'm not a user of either typing system, so I can't really champion either effort. That has to come from the community. |
If you want to update the API.md with some initial changes or documentation placeholders, I can collaborate with you on that to put it over the finish line. That's really the key thing needed to get to 5.0.0 final. |
react-redux v5 release notes (WIP)TL;DR
API CompatibilityVersion 5.0 maintains API compatibility with v4.x but due to major internal changes, we felt a major version bump was warranted. Store state change notifications sent to components are now guaranteed to occur top-down, so if your code may behave differently if it relied on notifications happening out of order. Internal ChangesInternally, the code for Performance improvementsSignificant performance gains were achieved by avoiding extra calls to BugfixesSome bugs/issues are resolved, related to performance loss and also impure components not re-rendering. New features added to connect()The behavior of New top level API: connectAdvanced()The new implementation of |
There's a start for the release notes. I'll start on the api.md and submit that as another PR once I have something substantial. |
It'd be nice to get the API docs more "official"-looking. At the moment, they're just buried in the repo, which is not terribly obvious. Can we Gitbook-ify them, publish them, and also add a pointer from the Redux docs to the React-Redux docs? |
I'm unfamiliar with Gitbook... what does that conversion entail? |
I think we can just reorganize the Readme a bit. A gitbook isn't really needed for only a couple pages of docs. The main Redux docs cover usage info for this repo anyways. We're better off leaving this one to just the basics. |
Okay. Can we at least stick some specific shorter "manual" |
I started updating docs here, but ran out of time tonight. |
There's an ok start to the docs update in PR #480. Would love some CC. |
@markerikson Can you give me an example of what to add in there for manual tags and I'll update the docs this weekend? @timdorr Thoughts on adding the beta release to the github releases tab? |
@jimbolla : You can stick HTML straight into Markdown, so what I did was insert <a id="general-only-react"></a>
### Can Redux only be used with React? |
@markerikson I threw some a tags in PR #480 |
Sorry I've been captain lazypants on this stuff. I hope to get to some of it in the next few days (namely another beta release). |
@timdorr It's all good. I appreciate that everyone has their own things going on. I just want to make sure this doesn't get lost. |
Finally pushed out beta 2: https://github.com/reactjs/react-redux/releases/tag/v5.0.0-beta.2 Sorry, I had an eventful week (lots of personal issues; check my Twitter feed), so I haven't had time for this lately :| |
Almost there... |
All set! I'm closing on a house on Wednesday, so can we do this at the end of the week? I can push an RC out tonight just to check any last-minute issues and prep the release notes and such. |
@timdorr Let me know if I can help. |
Sorry, I got tied up with some last-minute house things last night. Will try to get to that release soon. |
No sweat. Enjoy your new house and new Tesla, moneybags. 😆 |
OK, obviously didn't get to this over the weekend as promised. I'll try to push something out today. Just have to prepare the release notes and we'll be good. |
I have a regression between the beta3 and the rc1. |
@ghigt we added a setting in rc1 to make it opt-in, but then removed it in latest. there isn't a release w/ the latest. see the release notes for rc1 for details. |
Moving is haaard! 😭 |
@timdorr Can we publish an rc2 with the expected 5.0 change? |
I'm just going to go hardcore 5.0 whenever I have a chance. I'm moving the big stuff on Sunday (I'm doing what I can do in my car over the past week and through the weekend), so I should definitely be free by then. I keep trying to come up with time for it, but I also enjoy sleep 😜 |
@gnoff If you're eager to test it, I published the latest changes as {
resolve: {
alias: {
'react-redux': '@jimbolla/react-redux',
}
}
} |
@jimbolla sorry, I didn't understand well the release note. As I don't have any issue with the beta3, I'll keep it until the flag is removed. Thanks for your reply. |
I’d like to offer some words of caution about this one. We recently went through some pains rewriting React tests in terms of public API. We are rewriting its internals, and so unit tests for old internals turned out to be useless and sometimes complicated to port. I’m still not sure if the top-down subscription approach will pan out long term. I haven’t thought about it really. I don’t want to be the grumpy person here and I appreciate all the effort, but relying on lifecycle order feels fragile, and reliant on React implementation details. I’m not sure this exact approach will still work with Fiber in the future. React has the batching feature for this, and it will eventually batch everything by default. Maybe we can just flip the implementation then. In any case, I would prefer that we keep tests based around public API whenever possible. It’s fine to add more granular unit tests but any important behavior should have an integration test. Otherwise it will be tricky to change the underlying implementation later if we need to. |
I admittedly only really looked through the internals the one time during the work on #416, and haven't dug through them since. But: I thought the point of the top-down subscriptions was to avoid being dependent on lifecycle ordering. |
Just saw your Reddit comment at https://www.reddit.com/r/reactjs/comments/5hf4d4/an_artificial_example_where_mobx_really_shines/db09sf2/ . Quoting for posterity:
@jimbolla is way more familiar with the guts of this, and you're obviously way more familiar with the guts of React, but as I understand it there's two main intended benefits:
|
Right, but wouldn’t this problem cease to exist were all
Longer term this shouldn't matter. (That's what batching solves.)
It is dependent on |
Ah... as I understand it, no - it's the subscription itself that's the issue. In other words, something like: const mapState = (state, ownProps) => {
const itemForThisComponent = state.items[ownProps.itemID];
const {someValue} = itemForThisComponent;
return {someValue};
} If you deleted the item, then when |
This isn't true anymore. I removed the I added the top-down subscriptions to fix the stale props issue, as discussed in #292, as well as the your comments above. This ensures that The major perf issue in 4.5 was related to the way that the component's store listener would call My solution was to make sure the listener only has to call In order to take advantage of React's batched updates, we'd have to bring the props calculate back into the React lifecycle. I haven't completely thought it through, but I believe that would involve:
In my opinion, this way would be more reliant on React's implementation details. |
@jimbolla , side question: per your comments in dtinth/pixelpaint#1 (comment) , any other tweaks you can think of that would help improve perf in that kind of scenario? I know, I know, all programming is tradeoffs and nothing is perfect, just would be nice to say that v5 is better in every way :) |
BTW, the hold-up on this release is me. I just did my move today and don't yet have reliable internet access (coming to you from my phone's hotspot temporarily). Once they can plug in the right wire outside my house, I can get this taken care of and welcome us to The Future™! |
Obligatory tweet! https://twitter.com/timdorr/status/808898559097573376 |
Starting a list of things related getting v5 out the door.
connectAdvanced
, as well as new options passable toconnect
. PR Update API docs for v5 #480Nice to Haves:
connect
is split into to conceptual pieces:connectAdvanced
for store subscription and component lifecycle stuff vs connect's selector functions, many of the tests could be refactored to deal with just one or the other. This would be nice because would split the 2000+ line spec file in two, making it a little easier to work with. Also add new tests for some of the newconnect
options. (I personally need to learn how to run the new test coverage tools so I can see what's not covered.)The text was updated successfully, but these errors were encountered: