Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds support for React v18, migrates example from ReactDOM.render to createRoot based on React v18 guide.
NOTE: Tests are passing, however, they are throwing the ReactDOM.render warning since it seems that even the latest react-dom/test-utils is still using ReactDOM.render under the hood. It may be best to migrate tests to something like React Testing Library or simply wait for react-dom to catch up as it isn't affecting test results in any way.
NOTE: You may notice a suspicious test change regarding a childNode length assertion. After reviewing the code, I believe the {pre} portion of what used to be rendered, is now no longer rendered because it is/would be an empty string given how the test is setup. The stubbed suggestion for "Newa" would match Newark, NJ, there is no pre section to that match, leaving you with the {bolded} and {post} portions, giving you two children, rather than three. Likely related to this change
Checklist