Skip to content

Conversation

@banyan
Copy link
Contributor

@banyan banyan commented Jul 15, 2021

Ref: #349

Description

reactfire originally needed an experimental build of react, but in this commit, the reference has gone.
Do we still need an experimental build of react to use concurrent mode in reactfire? Or does stable react work fine?
The createRoot API does not exist in stable of react 17, so if this pull request is not correct, I think it needs to be mentioned like in the past.

Edit: perhaps, my PR is not correct, however, I want to clarify anyway.

@google-cla google-cla bot added the cla: yes label Jul 15, 2021
@jhuleatt
Copy link
Collaborator

Hi @banyan, thanks for the question and PR. The normal quickstart does indeed just use ReactDOM.render.

However, for the concurrent mode quickstart to use concurrent mode features, an experimental build of React is required, along with unstable_createRoot instead of render.

It looks like the concurrent mode quickstart is a little out of date. Would you be open to updating it? It would involve:

  1. Adding react@experimental and react-dom@experimental to step 3, with a link to the concurrent mode docs for explanation
  2. Changing ReactDOM.createRoot to ReactDOM.unstable_createRoot

@banyan banyan changed the title docs: Use ReactDOM.render since it relies on React stable API (v17) docs: Mention experimental build of React Jul 22, 2021
@banyan
Copy link
Contributor Author

banyan commented Jul 22, 2021

@jhuleatt

Thanks for the clarification! I've updated the document.

@jhuleatt
Copy link
Collaborator

🥇 Thank you for making the ReactFire docs better @banyan!

@jhuleatt jhuleatt merged commit d9061e7 into FirebaseExtended:main Jul 22, 2021
@FirebaseExtended FirebaseExtended locked and limited conversation to collaborators Aug 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants