Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

getDataFromTree not correctly resetting context providers #2135

Closed
@Torsten85

Description

@Torsten85

Intended outcome:
When using getDataFromTree, the context providers should be correctly reset to their initial value before the final React.renderToString call is executed

Actual outcome:
Context providers hold their last set value

How to reproduce the issue:
https://github.com/Torsten85/apollo-getDataFromTree

this repo should log:

Render #1 <div>Initial: 1<div>Nested Initial: 2</div></div>
Render #2 <div>Initial: 1<div>Nested Initial: 2</div></div>
Render #3 <div>Initial: 1<div>Nested Initial: 2</div></div>

but actually logs:

Render #1 <div>Initial: 1<div>Nested Initial: 2</div></div>
Render #2 <div>Initial: 1<div>Nested Initial: 2</div></div>
Render #3 <div>Initial: 2<div>Nested Initial: 3</div></div>

Version

  • apollo-client@2.3.5
  • react-apollo@2.1.6

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