Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions exercises/04.router/03.problem.race-conditions/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function Root() {
// 🐨 create a latestNav ref here which you can initialize to null if you like
const [nextLocation, setNextLocation] = useState(getGlobalLocation)
const [contentPromise, setContentPromise] = useState(initialContentPromise)
const [isPending, startTransition] = useTransition()
const [, startTransition] = useTransition()

const location = useDeferredValue(nextLocation)

Expand Down Expand Up @@ -65,7 +65,6 @@ function Root() {
navigate,
location,
nextLocation,
isPending,
},
},
use(contentPromise),
Expand Down
3 changes: 1 addition & 2 deletions exercises/04.router/03.solution.race-conditions/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Root() {
const latestNav = useRef(null)
const [nextLocation, setNextLocation] = useState(getGlobalLocation)
const [contentPromise, setContentPromise] = useState(initialContentPromise)
const [isPending, startTransition] = useTransition()
const [, startTransition] = useTransition()

const location = useDeferredValue(nextLocation)

Expand Down Expand Up @@ -64,7 +64,6 @@ function Root() {
navigate,
location,
nextLocation,
isPending,
},
},
use(contentPromise),
Expand Down
3 changes: 1 addition & 2 deletions exercises/04.router/04.problem.history/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function Root() {
const latestNav = useRef(null)
const [nextLocation, setNextLocation] = useState(getGlobalLocation)
const [contentPromise, setContentPromise] = useState(initialContentPromise)
const [isPending, startTransition] = useTransition()
const [, startTransition] = useTransition()

const location = useDeferredValue(nextLocation)

Expand Down Expand Up @@ -76,7 +76,6 @@ function Root() {
navigate,
location,
nextLocation,
isPending,
},
},
use(contentPromise),
Expand Down
3 changes: 1 addition & 2 deletions exercises/04.router/04.solution.history/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function Root() {
const latestNav = useRef(null)
const [nextLocation, setNextLocation] = useState(getGlobalLocation)
const [contentPromise, setContentPromise] = useState(initialContentPromise)
const [isPending, startTransition] = useTransition()
const [, startTransition] = useTransition()

const location = useDeferredValue(nextLocation)

Expand Down Expand Up @@ -79,7 +79,6 @@ function Root() {
navigate,
location,
nextLocation,
isPending,
},
},
use(contentPromise),
Expand Down
3 changes: 1 addition & 2 deletions exercises/04.router/05.problem.cache/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function Root() {
const [nextLocation, setNextLocation] = useState(getGlobalLocation)
// 🐨 change this to contentKey
const [contentPromise, setContentPromise] = useState(initialContentPromise)
const [isPending, startTransition] = useTransition()
const [, startTransition] = useTransition()

const location = useDeferredValue(nextLocation)
// 🐨 get the contentPromise from the contentCache by the contentKey
Expand Down Expand Up @@ -102,7 +102,6 @@ function Root() {
navigate,
location,
nextLocation,
isPending,
},
},
use(contentPromise),
Expand Down
3 changes: 1 addition & 2 deletions exercises/04.router/05.solution.cache/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function Root() {
const contentCache = useContentCache()
const [nextLocation, setNextLocation] = useState(getGlobalLocation)
const [contentKey, setContentKey] = useState(initialContentKey)
const [isPending, startTransition] = useTransition()
const [, startTransition] = useTransition()

const location = useDeferredValue(nextLocation)
const contentPromise = contentCache.get(contentKey)
Expand Down Expand Up @@ -96,7 +96,6 @@ function Root() {
navigate,
location,
nextLocation,
isPending,
},
},
use(contentPromise),
Expand Down
3 changes: 1 addition & 2 deletions exercises/05.actions/01.problem.action-reference/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function Root() {
const contentCache = useContentCache()
const [nextLocation, setNextLocation] = useState(getGlobalLocation)
const [contentKey, setContentKey] = useState(initialContentKey)
const [isPending, startTransition] = useTransition()
const [, startTransition] = useTransition()

const location = useDeferredValue(nextLocation)
const contentPromise = contentCache.get(contentKey)
Expand Down Expand Up @@ -96,7 +96,6 @@ function Root() {
navigate,
location,
nextLocation,
isPending,
},
},
use(contentPromise),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function Root() {
const contentCache = useContentCache()
const [nextLocation, setNextLocation] = useState(getGlobalLocation)
const [contentKey, setContentKey] = useState(initialContentKey)
const [isPending, startTransition] = useTransition()
const [, startTransition] = useTransition()

const location = useDeferredValue(nextLocation)
const contentPromise = contentCache.get(contentKey)
Expand Down Expand Up @@ -96,7 +96,6 @@ function Root() {
navigate,
location,
nextLocation,
isPending,
},
},
use(contentPromise),
Expand Down
3 changes: 1 addition & 2 deletions exercises/05.actions/02.problem.client/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function Root() {
const contentCache = useContentCache()
const [nextLocation, setNextLocation] = useState(getGlobalLocation)
const [contentKey, setContentKey] = useState(initialContentKey)
const [isPending, startTransition] = useTransition()
const [, startTransition] = useTransition()

const location = useDeferredValue(nextLocation)
const contentPromise = contentCache.get(contentKey)
Expand Down Expand Up @@ -107,7 +107,6 @@ function Root() {
navigate,
location,
nextLocation,
isPending,
},
},
use(contentPromise),
Expand Down
3 changes: 1 addition & 2 deletions exercises/05.actions/02.solution.client/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function Root() {
const contentCache = useContentCache()
const [nextLocation, setNextLocation] = useState(getGlobalLocation)
const [contentKey, setContentKey] = useState(initialContentKey)
const [isPending, startTransition] = useTransition()
const [, startTransition] = useTransition()

const location = useDeferredValue(nextLocation)
const contentPromise = contentCache.get(contentKey)
Expand Down Expand Up @@ -108,7 +108,6 @@ function Root() {
navigate,
location,
nextLocation,
isPending,
},
},
use(contentPromise),
Expand Down
3 changes: 1 addition & 2 deletions exercises/05.actions/03.problem.server/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function Root() {
const contentCache = useContentCache()
const [nextLocation, setNextLocation] = useState(getGlobalLocation)
const [contentKey, setContentKey] = useState(initialContentKey)
const [isPending, startTransition] = useTransition()
const [, startTransition] = useTransition()

const location = useDeferredValue(nextLocation)
const contentPromise = contentCache.get(contentKey)
Expand Down Expand Up @@ -108,7 +108,6 @@ function Root() {
navigate,
location,
nextLocation,
isPending,
},
},
// 🐨 the contentPromise is now an object with a root property, update this
Expand Down
3 changes: 1 addition & 2 deletions exercises/05.actions/03.solution.server/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function Root() {
const contentCache = useContentCache()
const [nextLocation, setNextLocation] = useState(getGlobalLocation)
const [contentKey, setContentKey] = useState(initialContentKey)
const [isPending, startTransition] = useTransition()
const [, startTransition] = useTransition()

const location = useDeferredValue(nextLocation)
const contentPromise = contentCache.get(contentKey)
Expand Down Expand Up @@ -108,7 +108,6 @@ function Root() {
navigate,
location,
nextLocation,
isPending,
},
},
use(contentPromise).root,
Expand Down
3 changes: 1 addition & 2 deletions exercises/05.actions/04.problem.revalidation/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function Root() {
const contentCache = useContentCache()
const [nextLocation, setNextLocation] = useState(getGlobalLocation)
const [contentKey, setContentKey] = useState(initialContentKey)
const [isPending, startTransition] = useTransition()
const [, startTransition] = useTransition()

// 🐨 add a useEffect here that reassigns updateContentKey to a function that
// accepts a newContentKey and calls setContentKey(newContentKey) in a startTransition
Expand Down Expand Up @@ -141,7 +141,6 @@ function Root() {
navigate,
location,
nextLocation,
isPending,
},
},
use(contentPromise).root,
Expand Down
3 changes: 1 addition & 2 deletions exercises/05.actions/04.solution.revalidation/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function Root() {
const contentCache = useContentCache()
const [nextLocation, setNextLocation] = useState(getGlobalLocation)
const [contentKey, setContentKey] = useState(initialContentKey)
const [isPending, startTransition] = useTransition()
const [, startTransition] = useTransition()

// set the updateContentKey function in a useEffect to avoid issues with
// concurrent rendering (useDeferredValue will create throw-away renders).
Expand Down Expand Up @@ -136,7 +136,6 @@ function Root() {
navigate,
location,
nextLocation,
isPending,
},
},
use(contentPromise).root,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function Root() {
const contentCache = useContentCache()
const [nextLocation, setNextLocation] = useState(getGlobalLocation)
const [contentKey, setContentKey] = useState(initialContentKey)
const [isPending, startTransition] = useTransition()
const [, startTransition] = useTransition()

// set the updateContentKey function in a useEffect to avoid issues with
// concurrent rendering (useDeferredValue will create throw-away renders).
Expand Down Expand Up @@ -145,7 +145,6 @@ function Root() {
navigate,
location,
nextLocation,
isPending,
},
},
use(contentPromise).root,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function Root() {
const contentCache = useContentCache()
const [nextLocation, setNextLocation] = useState(getGlobalLocation)
const [contentKey, setContentKey] = useState(initialContentKey)
const [isPending, startTransition] = useTransition()
const [, startTransition] = useTransition()

// set the updateContentKey function in a useEffect to avoid issues with
// concurrent rendering (useDeferredValue will create throw-away renders).
Expand Down Expand Up @@ -142,7 +142,6 @@ function Root() {
navigate,
location,
nextLocation,
isPending,
},
},
use(contentPromise).root,
Expand Down
Loading