Sign in to join this conversation, and others like it, in the communities you care about.
can anyone help me, this is what I did before getting the error 1.npx create-react-app my-app 2.cd my-app 3.npm start browser raises error -Uncaught SyntaxError: Invalid regular expression flags
Landing Page Book - React components for landing pages
How to dispatch action in none react component ?
Haptics on the mobile web?
Why don't React class components tree-shake?
React / General
We went from tons of stuff in Redux to almost nothing
Now with apollo-link-state (https://www.apollographql.com/docs/link/links/state.html) you can even use GraphQL for the things you use Redux for!
I don't know how popular that will be, but it's an option
GraphQL is a query language while Redux is a library for state management. Two completely different things. You may say that Apollo client will replace Redux, which might be true, but even that's is inaccurate today, because Apollo uses Redux under the hood. However, since I'm using Apollo and GraphQL and haven't wrote a single reducer (yet). There're several hooks to update state after mutation/query/subscription and writing a custom reducer is the last choice.
This feels like a weird statement. A query protocol replacing a front end state management lib. We will always need both of those things. Optimistic updates Can’t be done without state management. Offline first. The question needs rewording. Maybe “Is it worth managing our own state now that Apollo or Relay do it so well?” For our application the answer to that question is yes, we do optimistic updates and server sent events that need reconciling on the front end. If either Apollo or Relay can handles SSEs our the box please fill me in.
Hi James, here's one article anyway: https://dev-blog.apollodata.com/reducing-our-redux-code-with-react-apollo-5091b9de9c2a
From our experience, most of our state management code was all trying to merge state from our API server and manage the asynchronous nature of all that. Once we switched to GraphQL, those issues were gone and we no longer had to manage business state in a store at all.w Hope that helps!
They aren't. The GraphQL query language is completely independent from the GraphQL *client library*. The thing is, a lot of GraphQL client libraries include a caching mechanism to manage the data that is pulled from a GraphQL backend. So the "state management" part is really just some GraphQL clients managing cached GraphQL data. This is completely optional though, and you can use GraphQL without it, potentially with Redux.