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] sort-comp: add class component examples #3339

Merged
merged 1 commit into from Jul 16, 2022
Merged

[Docs] sort-comp: add class component examples #3339

merged 1 commit into from Jul 16, 2022

Conversation

maurer2
Copy link
Contributor

@maurer2 maurer2 commented Jul 15, 2022

Hello, I updated the examples for sort-comp, that were still using createClass with class component examples.

Cheers

@maurer2 maurer2 marked this pull request as ready for review July 15, 2022 22:22
@codecov
Copy link

codecov bot commented Jul 15, 2022

Codecov Report

Merging #3339 (caadfd3) into master (bdbd2a4) will not change coverage.
The diff coverage is n/a.

❗ Current head caadfd3 differs from pull request most recent head 87fb344. Consider uploading reports for the commit 87fb344 to get more accurate results

@@           Coverage Diff           @@
##           master    #3339   +/-   ##
=======================================
  Coverage   97.71%   97.71%           
=======================================
  Files         123      123           
  Lines        8788     8788           
  Branches     3190     3190           
=======================================
  Hits         8587     8587           
  Misses        201      201           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bdbd2a4...87fb344. Read the comment docs.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Rather than replacing these examples, let's add them so we have both

docs/rules/sort-comp.md Outdated Show resolved Hide resolved
docs/rules/sort-comp.md Outdated Show resolved Hide resolved
docs/rules/sort-comp.md Outdated Show resolved Hide resolved
docs/rules/sort-comp.md Outdated Show resolved Hide resolved
@maurer2
Copy link
Contributor Author

maurer2 commented Jul 16, 2022

Okay, I restored the createClass examples and fixed the formatting issues.
Cheers

docs/rules/sort-comp.md Outdated Show resolved Hide resolved
@maurer2
Copy link
Contributor Author

maurer2 commented Jul 16, 2022

Implemented the onClick changes, but I think onClick = this.onClick.bind(this); needs to be in the constructor to avoid a Property 'onClick' is used before its initialization` warning

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Thanks!

@ljharb ljharb changed the title Replace createClass in sort-comp examples with class component [Docs] sort-comp: add class component examples Jul 16, 2022
@ljharb ljharb merged commit 87fb344 into jsx-eslint:master Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants