Skip to content

Consolidate on loaderData name instead of data for types #14052

@brophdawg11

Description

@brophdawg11

Discussed in #13934

Originally posted by rossipedia July 4, 2025
There's a bit of an inconsistency in which types use loaderData and which use just data:

Inconsistent names are harder to reason about, and harder to work with when code-modding larger codebases. There's a bit of extra cognitive overhead too ("Data? Is this loader data? Action data? wait... which one even makes sense in this context? hmmm")

I propose all data properties be explicitly named either loaderData or actionData to reflect what their actual data represents.

This could be done incrementally (as suggested by @MichaelDeBoey on Discord):

  • Introduce loaderData and actionData where needed as a duplicate property for the existing ambiguous data
  • Mark data as @deprecated
  • Remove data in a future major version

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Stage 5 - Stable

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions