Skip to content

Conversation

mohit-negi
Copy link
Contributor

Fixes issue - JSX.Element is Deprecated #643

This PR fixes the usage of deprecate JSX.Element to React.JSX.Element

####Changes made to the

  • Typing-component-props
    typing-component-props

  • Function components
    function-components

@mohit-negi
Copy link
Contributor Author

Hey, this is my first contribution. I would like to know why the CI/files-up-to-date (pull_request) failed. I will fix the errors if the CI is failing from my end

@eps1lon
Copy link
Member

eps1lon commented Oct 2, 2023

For CI, you usually go to the failing step. Here it would have been "yarn gen-readme changes committed?" which should have signaled that you need to commit the changes from yarn gen-readme. But maybe this wasn't clear enough so I did it for you.

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

You missed some JSX.Element as well as other members of the JSX namespace. For this kind of work search&replace are your best friends. I fixed all the other instances I found.

@eps1lon eps1lon changed the title fixes usage of deprecated JSX.Element to React.JSX.Element #643 fixes usage of deprecated global JSX in favor of React.JSX Oct 2, 2023
@eps1lon eps1lon changed the title fixes usage of deprecated global JSX in favor of React.JSX replace usage of deprecated global JSX in favor of React.JSX Oct 2, 2023
@eps1lon eps1lon linked an issue Oct 2, 2023 that may be closed by this pull request
@mohit-negi
Copy link
Contributor Author

Got it, it was a mistake. I should've done better 😔

You missed some JSX.Element as well as other members of the JSX namespace. For this kind of work search&replace are your best friends. I fixed all the other instances I found.

Although I followed the contributing guide and still failed, we should update the Contributing README so that newbies like me will have ideas about how to make a successful contribution

For CI, you usually go to the failing step. Here it would have been "yarn gen-readme changes committed?" which should have signaled that you need to commit the changes from yarn gen-readme. But maybe this wasn't clear enough so I did it for you.

Thanks for taking your time 🙏

Copy link
Collaborator

@filiptammergard filiptammergard left a comment

Choose a reason for hiding this comment

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

Thanks!

@filiptammergard filiptammergard merged commit 7c4f3b0 into typescript-cheatsheets:main Oct 2, 2023
@filiptammergard filiptammergard mentioned this pull request Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSX.Element is Deprecated
3 participants