Git Product home page Git Product logo

Comments (4)

kiliman avatar kiliman commented on May 18, 2024

What does the Network tab look like?

from remix.

TheBuilderJR avatar TheBuilderJR commented on May 18, 2024

Here's a video. Notice how only after a manual refresh does the left bar reload the data.

Area.mp4

from remix.

TheBuilderJR avatar TheBuilderJR commented on May 18, 2024

This actually seems to be a problem with react arborist. Closing this issue since it's not remix related.

from remix.

dusty avatar dusty commented on May 18, 2024

Just thought I'd add a comment on here in case anyone searches. I was having a similar problem where it seemed my action wasn't reloading the parent loader.

Turns out my page had a cancel button (which was a link) on it with a prefetch set to intent. I also set some cache headers on prefetch.

import { isPrefetch } from 'remix-utils/is-prefetch'
...
const isGet = request.method.toLowerCase() === 'get'
if (isGet && isPrefetch(request) && !headers.has('cache-control')) {
  headers.set('cache-control', 'private, max-age=5, stale-while-revalidate=10')
}

So, I happened to be hovering the cancel button before I got to the submit button. This was sending a prefetch that was cached by the time I hit the submit button and redirected.

I was able to figure that out by looking at the network tab and seeing that the parent loader was actually being served by a prefetch cache. Removing the intent fixed the problem.

footgun

:)

from remix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.