Skip to content

Fetch data when deep linking to sub route doesn't work #47

@adriaanbalt

Description

@adriaanbalt

It appears that the following snippet causes sub routes to never perform their fetch if you deep link directly to them.

// Don't fetch data for initial route, server has already done the work:
      if (window.INITIAL_STATE) {
        // Delete initial data so that subsequent data fetches can occur:
        delete window.INITIAL_STATE
      } else {
        // Fetch mandatory data dependencies for 2nd route change onwards:
        trigger('fetch', components, locals)
      }

What if you are rendering a page that is partially server rendered but still needs to retrieve more data? For example, I load up my profile page directly instead of going to the home page first?

The above code works when going from the first page to the second page. But regardless will never fetch on the first page.

If this is intentional, can you explain why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions