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

[docs] Migrate batch of demos to hooks/typescript #16003

Merged
merged 8 commits into from
Jun 3, 2019

Conversation

merceyz
Copy link
Member

@merceyz merceyz commented Jun 2, 2019

Migrated the following demos to hooks/typescript:

  • components/links/ButtonLink.tsx
  • components/links/Links.tsx
  • components/transitions/SimpleCollapse.tsx
  • components/transitions/SimpleFade.tsx
  • components/transitions/SimpleGrow.tsx
  • components/transitions/SimpleSlide.tsx
  • components/transitions/SimpleZoom.tsx
  • components/typography/TypographyTheme.tsx
  • customization/components/ClassesNesting.tsx
  • customization/components/ClassesShorthand.tsx
  • customization/components/ClassesState.tsx

Copy link
Member

@joshwooding joshwooding left a comment

Choose a reason for hiding this comment

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

Good work! Just a few things that I think should be changed :)

docs/src/pages/components/links/ButtonLink.js Outdated Show resolved Hide resolved
state = {
checked: false,
};
function SimpleCollapse() {
Copy link
Member

Choose a reason for hiding this comment

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

Just a preference can you make the function arrow functions?

Copy link
Member Author

Choose a reason for hiding this comment

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

Looking at the other demos, this is they way it's done in those.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, seems like there's a mix then. It should be fine to leave this as is then. I'm not sure which syntax we are preferring cc @oliviertassinari @eps1lon

Copy link
Member

Choose a reason for hiding this comment

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

I really don't care. As long as both are named and no this is used inside the body they should be equivalent. Is there an observable difference between arrow functions and function declarations in this case?

docs/src/pages/components/transitions/SimpleGrow.js Outdated Show resolved Hide resolved
@joshwooding joshwooding added docs Improvements or additions to the documentation typescript labels Jun 2, 2019
@mui-pr-bot
Copy link

No bundle size changes comparing b0c846a...e01a721

Generated by 🚫 dangerJS against e01a721

@eps1lon
Copy link
Member

eps1lon commented Jun 3, 2019

Could you add a quick summary so that I can update #14897?

@merceyz
Copy link
Member Author

merceyz commented Jun 3, 2019

@eps1lon Done

@eps1lon eps1lon mentioned this pull request Jun 3, 2019
@eps1lon eps1lon merged commit ecb0897 into mui:master Jun 3, 2019
@eps1lon
Copy link
Member

eps1lon commented Jun 3, 2019

@merceyz Much appreciated, thanks!

@merceyz merceyz deleted the docs/typescript-batch branch June 3, 2019 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants