-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to v5 and run codemods (#165)
* Upgrade to v5 and run codemods * Update pw reset user setup to store hash token * Pretty stuff up * Update to 5.3
- Loading branch information
Erik Guzman
authored
Jun 9, 2023
1 parent
acba9ae
commit b6c86a7
Showing
9 changed files
with
4,113 additions
and
3,770 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
import ReactDOM from 'react-dom' | ||
import { hydrateRoot, createRoot } from 'react-dom/client' | ||
|
||
import App from './App' | ||
/** | ||
* When `#redwood-app` isn't empty then it's very likely that you're using | ||
* prerendering. So React attaches event listeners to the existing markup | ||
* rather than replacing it. | ||
* https://reactjs.org/docs/react-dom.html#hydrate | ||
* https://reactjs.org/docs/react-dom-client.html#hydrateroot | ||
*/ | ||
const rootElement = document.getElementById('redwood-app') | ||
const redwoodAppElement = document.getElementById('redwood-app') | ||
|
||
if (rootElement.children?.length > 0) { | ||
ReactDOM.hydrate(<App />, rootElement) | ||
if (redwoodAppElement.children?.length > 0) { | ||
hydrateRoot(redwoodAppElement, <App />) | ||
} else { | ||
ReactDOM.render(<App />, rootElement) | ||
const root = createRoot(redwoodAppElement) | ||
root.render(<App />) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.