-
Notifications
You must be signed in to change notification settings - Fork 205
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
Bump more navigator frontend deps #8141
Conversation
8d7dd72
to
8dd26fa
Compare
@@ -68,5 +73,8 @@ ReactDOM.render(( | |||
document.getElementById('app'), | |||
); | |||
|
|||
// Dispatch an action for the initial URL so that the reducer can set the | |||
// initial state correctly. | |||
store.dispatch(pathToAction(window.location.pathname)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redux now throws an exception if a middleware dispatches during construction. So the initial dispatch from the router needs to move here.
Router.middleware({ stateToUrl: stateToPath, urlToAction: pathToAction }), | ||
ReduxThunk, | ||
)), | ||
const store: Store<App.State> & {dispatch: ThunkDispatch<App.State, undefined, App.Action>} = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dispatches are now typed much more strictly.
// initial state correctly. | ||
dispatch(urlToAction(window.location.pathname)); | ||
|
||
return ({ dispatch, getState }: MiddlewareAPI<Dispatch, S>): (next: Dispatch) => Dispatch => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth noting that Dispatch
is now parametrized by the action not the state which is why the type parameters here have dropped (defaulting to any
which Middleware
forces us to use).
@@ -137,7 +137,7 @@ export default class Autosuggest<R> | |||
); } | |||
} | |||
renderSuggestionsContainer={ | |||
({containerProps, children}: {containerProps: {}, children: {}[]}) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Types are now sensible by default with the react-autosuggest
update.
* added and what the result is (that is, the props the resulting component | ||
* still needs). | ||
*/ | ||
export type Connect<Add, To> = (c: React.ComponentType<To & Add>) => React.ComponentClass<To>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The types of react-redux
connect
got more complex which has turned this into a huge mess with no benefit that I could see so I just inlined compose
and avoided the Connect
annotation.
changelog_begin changelog_end
8dd26fa
to
05b7785
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Next set of bumps. The main breaking change this time is
redux
. There is more coming but I’ll try to keep it into somewhat manageable chunks. Don’t be too scared by the diff stats, a lot of it is theyarn.lock
.changelog_begin
changelog_end
Pull Request Checklist
CHANGELOG_BEGIN
andCHANGELOG_END
tagsNOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.