This file contains hidden or 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
import {useEffect, useMemo} from 'react' | |
import {RecoilRoot, useRecoilState, atom} from 'recoil' | |
// User data | |
const user1 = {username: 'joe', bio: "You will never see me, unless of course this example is totally broken."} | |
const user2 = {username: 'bob', bio: "I am the one true user."} | |
const user3 = {username: 'fred', bio: "Just kidding, make way for the new guy."} | |
// A potentially dangerous mutable global variable for initial state. The main |
This file contains hidden or 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
import { RemixBrowser } from '@remix-run/react' | |
import { startTransition, StrictMode } from 'react' | |
import { hydrateRoot } from 'react-dom/client' | |
function clearBrowserExtensionInjectionsBeforeHydration() { | |
document | |
.querySelectorAll( | |
[ | |
'html > *:not(body, head)', | |
'script[src*="extension://"]', |