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

refactor: replaced string refs with React.createRef across examples #1860

Closed
wants to merge 1 commit into from

Conversation

devesh760
Copy link

@devesh760 devesh760 commented Dec 15, 2024

Thanks for contributing to react-virtualized!

Checklist

  • The existing test suites (npm test) all pass
  • For any new features or bug fixes, both positive and negative test cases have been added
  • For any new features, documentation has been added (n/a)
  • For any documentation changes, the text has been proofread and is clear to both experienced users and beginners
  • Format your code with prettier (yarn run prettier)
  • Run the Flow typechecks (yarn run typecheck)

Description

This pull request removes the deprecated string refs and replaces them with React.createRef() across example files. String refs have been removed in React 19, so this update ensures compatibility with the latest version of React.

Changes Made:

  • Updated ListExample to use React.createRef() instead of string refs for the List component.
  • Updated TableExample to use React.createRef() instead of string refs for the Table component.
  • Adjusted related bindings and state initializations to support React.createRef().
  • Modified associated documentation to reflect these changes.

Testing

  • Verified that all existing test suites pass without errors.
  • Manually tested the List and Table components to ensure they function as expected with the updated refs.

Let me know if further adjustments are needed! 😊

@devesh760 devesh760 changed the title removed: string refs as they are deprecated and removed in React 19 refactor: replaced string refs with React.createRef across examples Dec 15, 2024
@devesh760 devesh760 closed this Dec 25, 2024
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.

1 participant