Giter VIP home page Giter VIP logo

Comments (11)

Sly777 avatar Sly777 commented on May 22, 2024 8

I'm planning to work on this on couple of weeks but PR's welcome :) @lolcoolkat

from ran.

willopez avatar willopez commented on May 22, 2024 3

@Sly777 looking forward to this PR, and thank you for your work.

from ran.

dihmeetree avatar dihmeetree commented on May 22, 2024 1

Any update on this?

from ran.

ranleung avatar ranleung commented on May 22, 2024 1

hi, any update on this? :)

from ran.

aarondancer avatar aarondancer commented on May 22, 2024

Something to note, they’ve remove Redux as the default cache for Apollo. Redux (as well as other stores) can still be used with configuration.

from ran.

Enalmada avatar Enalmada commented on May 22, 2024

I am extremely grateful for @sly77's contribution to the community. As a new user, this template looks like an amazing place to start containing much that I need to learn about. Please don't lose momentum on this amazing project.

from ran.

Sly777 avatar Sly777 commented on May 22, 2024

Hey @willopez & @Enalmada! Honestly, I couldn't continue on this issue because of my new job and other changes. It would be really nice if someone helps me on this :)

from ran.

Enalmada avatar Enalmada commented on May 22, 2024

I totally know how that goes! I hope that someone watching that has some apollo experience would be willing to give back to the community and do this upgrade. I looked at the upgrade docs and they don't look too bad: https://www.apollographql.com/docs/apollo-server/v2/migration-two-dot.html
(I am currently just evaluating potential tech for upgrading our site and have not actually used any of the RAN tech yet but this template gives me confidence RAN is the way to go and will contribute in the future as I get up to speed)

from ran.

Sly777 avatar Sly777 commented on May 22, 2024

I was working on this last weekend but I realized the biggest issue is the new local cache feature of Apollo. It doesn't fit redux well and I need to change the structure without redux which nobody wants I think :) I also tried to find redux plugins for this but there is no good option to integrate into RAN. So I stuck a little bit because of redux. I also thought maybe we can use something like this;

<Provider store={store}>
  <ApolloProvider client={client}>
     <Component {...props} />
  </ApolloProvider>
</Provider>

But in this structure, there are some missing parts between Apollo and Redux.

So it's open for any suggestions.

from ran.

Enalmada avatar Enalmada commented on May 22, 2024

Experienced users will struggle emotionally with eliminating redux from their stack but based on my research it might be the right thing to do:

The new apollo is trying to intentionally and conveniently eliminate the cognitive and maintenance overhead of maintaining a separate local store (link). Relay is also going that direction. I believe users discovering RAN are mostly newer and wanting to learn production best practices and optimizations. There is no doubt they need to learn a graphql client. The question experienced users need to try and answer as unemotionally as possible...can the current version of apollo client (and perhaps some context) eliminate the price to learn and maintain redux or do new users still need it?

ReasonReact, what Facebook is migrating their internal production into, comes with the concept of reducer built into the language. The combination of this plus graphql client local store continually improving I believe is going to completely deprecate redux. Knowing redux is likely not part of our future might help people accept moving away from it now.

This thread here is valuable reading for anyone willing to help evaluate the pros/cons of potential best ways forward based on where we are at (linking directly to some real examples that might help but read the whole thread).

@Sly777 Perhaps this apollo-cache-redux could help bridge the gap which I saw in this thread? (actually doesn't feel like it supports redux 4 or is going to be maintained)

from ran.

Sly777 avatar Sly777 commented on May 22, 2024

Thanks to @gufranmirza, RAN started to use new react apollo from now on!!

from ran.

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.