Skip to content

ref(js): Remove componentPromise from Route props#34983

Merged
evanpurkhiser merged 1 commit into
masterfrom
evanpurkhiser/ref-js-remove-componentpromise-from-route-props
May 25, 2022
Merged

ref(js): Remove componentPromise from Route props#34983
evanpurkhiser merged 1 commit into
masterfrom
evanpurkhiser/ref-js-remove-componentpromise-from-route-props

Conversation

@evanpurkhiser

@evanpurkhiser evanpurkhiser commented May 25, 2022

Copy link
Copy Markdown
Member

Another step towards moving away from react-router 3

Comment thread static/app/routes.tsx
* Factory function to produce a component that will render the SafeLazyLoad
* _with_ the required props.
*/
function make<C extends ComponentType>(resolve: () => PromisedImport<C>) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can maybe rename this later to something better

@priscilawebdev priscilawebdev May 25, 2022

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it would be nice if the name is more descriptive

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I named it this since this file only really does one thing make routes, lol

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could call it loadRoute() or importView() 🤷

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just wanted it to be short so it doesn't wrap too many entires 😅

I figure since it's one of the only functions in this file, a short name is OK -- since it's used like 300 times

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bake()

@evanpurkhiser evanpurkhiser merged commit 7bed103 into master May 25, 2022
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/ref-js-remove-componentpromise-from-route-props branch May 25, 2022 18:56
evanpurkhiser added a commit that referenced this pull request May 25, 2022
getsentry-bot added a commit that referenced this pull request May 25, 2022
This reverts commit 7bed103.

Co-authored-by: evanpurkhiser via Slack <evan.purkhiser@sentry.io>
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants