Skip to content

[Docs]: Tutorial: Address Book Tutorial has a bug #13125

@stephenfrench9

Description

@stephenfrench9

Describe what's incorrect/missing in the documentation

After I complete the Loading Data section of the tutorial, I have an app that at first looks like it is behaving correctly, but if I am on http://localhost:5173/ and I hit the refresh button, the app fails and I get an error message.

The error message in full is:

Oops!
Cannot destructure property 'contacts' of 'loaderData' as it is null.

TypeError: Cannot destructure property 'contacts' of 'loaderData' as it is null.
    at App (http://localhost:5173/app/root.tsx:16:5)
    at react-stack-bottom-frame (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=83c3ed90:16192:20)
    at renderWithHooks (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=83c3ed90:4306:24)
    at updateFunctionComponent (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=83c3ed90:5972:21)
    at beginWork (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=83c3ed90:7048:20)
    at runWithFiberInDEV (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=83c3ed90:726:18)
    at performUnitOfWork (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=83c3ed90:10831:98)
    at workLoopSync (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=83c3ed90:10692:43)
    at renderRootSync (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=83c3ed90:10675:13)
    at performWorkOnRoot (http://localhost:5173/node_modules/.vite/deps/react-dom_client.js?v=83c3ed90:10323:46)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions