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

Tutorials need to show ReactDOM.createRoot() to match React 18 #4480

Open
markerikson opened this issue Feb 11, 2023 · 5 comments
Open

Tutorials need to show ReactDOM.createRoot() to match React 18 #4480

markerikson opened this issue Feb 11, 2023 · 5 comments
Labels

Comments

@markerikson
Copy link
Contributor

Both the "Essentials" and "Fundamentals" tutorials are currently showing ReactDOM.render(), and that needs to be update to match React 18.

@marktlinn
Copy link

Both the "Essentials" and "Fundamentals" tutorials are currently showing ReactDOM.render(), and that needs to be update to match React 18.

I'm happy to work on this and update the tutorials for React

@markerikson
Copy link
Contributor Author

@marksist300 unfortunately it's more complicated than just updating a couple of render() calls. The example repos need to be reworked, and that requires actually doing a bunch of Git history surgery to alter the first commits, rebase all the following commits, and update all the tags used by the example sandboxes.

@marktlinn
Copy link

@marksist300 unfortunately it's more complicated than just updating a couple of render() calls. The example repos need to be reworked, and that requires actually doing a bunch of Git history surgery to alter the first commits, rebase all the following commits, and update all the tags used by the example sandboxes.

Ah, ok. I thought rebasing public repos was generally a 'no no'?

@markerikson
Copy link
Contributor Author

Usually! But in this case, it's a template/example repo. The main purpose is to have a known sequence of commits that build the example app step-by-step, and the CodeSandboxes in the tutorial pages link to specific commits by tag so they can show the state of the code as of those commits.

The other use case is that the first commit in the repo has all the dependencies listed and the basic scaffolding, so that learners can clone the repo and follow along with the tutorial by writing each step themselves.

Given that, users don't care about the history of the repo, exactly. There's no ongoing development, no one is going to clone it and try to push feature branches, etc. Also, all the rebasing I'm talking about is solely for the tutorial-steps branch, and I'm the only one who's touched that :)

@marktlinn
Copy link

OK. Probably best left to someone who knows exactly what should and shouldn't be included from the git history then 🙂.

I was looking through the Redux fundamentals last night and noticed the docs are using e.which to register keystrokes:

Screenshot 2023-02-24 at 09 19 49

Wasn't sure it would warrant a separate issue, but it should probably be added to the list of code snippets to update as it's deprecated. It's used on several pages.

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

No branches or pull requests

2 participants