Coder Social home page Coder Social logo

SSR does not work about axios-hooks HOT 7 CLOSED

simoneb avatar simoneb commented on July 21, 2024
SSR does not work

from axios-hooks.

Comments (7)

chris-visser avatar chris-visser commented on July 21, 2024 3

Figured the same thing. Its only pre-loading the data to prevent a client fetch.

from axios-hooks.

sieglingm avatar sieglingm commented on July 21, 2024

Also thanks from my side for your effort and work. But I agree with above statements: That is not server side rendering. For that the html code has to be rendered with data already on server side which is not the case. The data fetching on server side works, the cache is correctly filled on client side on the initial prerendered page.
But I have another problem: The option 'useCache=true' does not seem to work, the fetch is still executed again on client side with date=undefined and loading=true.

from axios-hooks.

simoneb avatar simoneb commented on July 21, 2024

I am aware of this issue, I've reproduced it but I've postponed work on it because I figured it would require a considerable rewrite of the caching layer, which is now relying on axios's built-in caching mechanism and which cannot work in SSR scenarios. I'm planning to work on this at some point, but I don't know when yet. Of course, any PR is more than welcome and I'm available to provide implementation hints if anyone's interested in picking this up.

from axios-hooks.

simoneb avatar simoneb commented on July 21, 2024

But I have another problem: The option 'useCache=true' does not seem to work, the fetch is still executed again on client side with date=undefined and loading=true.

@sieglingm If this is a different issue, can you please file a new one?

from axios-hooks.

bananamboon avatar bananamboon commented on July 21, 2024

hello guys, are there any developments for this issue?

from axios-hooks.

simoneb avatar simoneb commented on July 21, 2024

@bananamboon no developments unfortunately. I don't have enough time to spend on this myself and I would be happy to see a contribution to address this issue.

from axios-hooks.

anh072 avatar anh072 commented on July 21, 2024

if the data is not fetched and HTML is not rendered on server side, then its not really SSR. the README says it supports SSR which is very misleading. I think people come to this repo mainly because of SSR support

Any follow-up on this issue

from axios-hooks.

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.