Skip to content
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

chore: Updated React component typing #193

Merged
merged 1 commit into from Jul 22, 2021

Conversation

chandelieraxel
Copy link
Contributor

Actual React functional component typings are using SFC, which are deprecated : DefinitelyTyped/DefinitelyTyped#30364

Updated them to Functional Component

@@ -35,7 +35,7 @@ const LargeStyle: CSSProperties = {
}

// From https://www.smashingmagazine.com/2013/07/simple-responsive-images-with-css-background-images/
const Img: React.SFC<
const Img: React.FunctionComponent<
Copy link
Member

Choose a reason for hiding this comment

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

(non-blocking) -- note you can also use the abbreviated version, React.FC

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, hesitated for a bit, but I find abbreviation confusing in code (interpretation differ from peoples), which is why I choose this way. Thanks for the feedback :D

@damassi
Copy link
Member

damassi commented Jul 22, 2021

🙏

@damassi damassi merged commit 5c30c32 into artsy:master Jul 22, 2021
@artsyit
Copy link
Contributor

artsyit commented Jul 22, 2021

🚀 PR was released in v1.9.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants