Skip to content

Component not re-render in apollo-link-state after upgrading apollo-cache-inmemory to 1.3.* #3992

Closed
@laukaichung

Description

@laukaichung

Intended outcome:

I use apollo link state to save an array of objects to the local client. In apollo-cache-inmemory 1.2.10, the component is able to re-render on pushing new items to the array or deleting one item from the array. After upgrading to 1.3.5, I expected everything would stay the same.

Actual outcome:

However the component fails to re-render at all with 1.3.*.

How to reproduce the issue:

apollo-cache-inmemory 1.2.10:

https://codesandbox.io/s/l99l9r1ml9 (There's an issue with codesandbox. I have to double click the buttons to trigger the re-render, but on my local, there's no such issue.)

apollo-cache-inmemory 1.3.5

https://codesandbox.io/s/8xqn9mz0l (It doesn't work at all, even if I double click either buttons)

Versions

  "dependencies": {
    "graphql": "0.13.2",
    "react": "16.5.0",
    "apollo-cache-inmemory": "1.3.5",
    "apollo-link-state": "^0.4.2",
    "apollo-link-http": "1.5.5",  
    "react-apollo": "2.2.4",
    "react-dom": "16.2.0",
    "apollo-client": "^2.4.2",
    "graphql-tag": "^2.10.0"        
  },

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions