Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking: Use stable context API #471

Merged
merged 1 commit into from Apr 15, 2019

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Mar 12, 2019

React@16.6.0 allows usage of static contextType. With 16.0.0 we would need a higher-order component that puts the context value into props since Transition needs to have access to the context in its constructor.

Partial fix for #429

breaking change

// package.json
-"react": "^15.0.0",
+"react": "^16.6.0",
-"react-dom": "^15.0.0", 
+"react-dom": "^16.6.0", 

@TrySound
Copy link
Contributor

Duplicate of #427

@eps1lon
Copy link
Collaborator Author

eps1lon commented Mar 12, 2019

Duplicate of #427

Same goal, different implementation. This one uses contextType instead of a hoc and doesn't have 3rd party dependencies. And it doesn't break any test. CI is failing unrelated just like #468

But yes it would've been nice to link this from the the corresponding issue.

@@ -50,8 +50,8 @@
]
},
"peerDependencies": {
"react": ">=15.0.0",
"react-dom": ">=15.0.0"
"react": ">=16.6.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can kill react-lifecycles-compat now, awesome!
https://bundlephobia.com/result?p=react-lifecycles-compat@3.0.4

eps1lon added a commit to eps1lon/react-transition-group that referenced this pull request Apr 11, 2019
@Vodzo
Copy link

Vodzo commented Apr 15, 2019

Could this be released as @3 or even beta? Current legacy context implementation has issues when used with latest react-router and react-redux both of which are using the new Context API. This pull request fixes those issues I'm seeing in my code

@jquense jquense merged commit aee4901 into reactjs:master Apr 15, 2019
@jquense
Copy link
Collaborator

jquense commented Apr 15, 2019

we've got semantic release now, let's (talking mostly to myself) not be afraid of bumping integers

jquense pushed a commit that referenced this pull request Apr 15, 2019
# [3.0.0](v2.9.0...v3.0.0) (2019-04-15)

### Features

* use stable context API ([#471](#471)) ([aee4901](aee4901)), closes [#429](#429)

### BREAKING CHANGES

* use new style react context

```diff
// package.json
-"react": "^15.0.0",
+"react": "^16.6.0",
-"react-dom": "^15.0.0",
+"react-dom": "^16.6.0",
```
@jquense
Copy link
Collaborator

jquense commented Apr 15, 2019

🎉 This PR is included in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@TrySound
Copy link
Contributor

@jquense So fast. I expected esm support to be released in v3 as major change.

@eps1lon eps1lon deleted the feat/stable-context branch April 15, 2019 15:08
johnfrench3 pushed a commit to johnfrench3/transition-group-react that referenced this pull request Nov 2, 2022
# [3.0.0](reactjs/react-transition-group@v2.9.0...v3.0.0) (2019-04-15)

### Features

* use stable context API ([#471](reactjs/react-transition-group#471)) ([aee4901](reactjs/react-transition-group@aee4901)), closes [#429](reactjs/react-transition-group#429)

### BREAKING CHANGES

* use new style react context

```diff
// package.json
-"react": "^15.0.0",
+"react": "^16.6.0",
-"react-dom": "^15.0.0",
+"react-dom": "^16.6.0",
```
patrickm68 added a commit to patrickm68/react-transition-group-developer that referenced this pull request Dec 1, 2022
# [3.0.0](reactjs/react-transition-group@v2.9.0...v3.0.0) (2019-04-15)

### Features

* use stable context API ([#471](reactjs/react-transition-group#471)) ([aee4901](reactjs/react-transition-group@aee4901)), closes [#429](reactjs/react-transition-group#429)

### BREAKING CHANGES

* use new style react context

```diff
// package.json
-"react": "^15.0.0",
+"react": "^16.6.0",
-"react-dom": "^15.0.0",
+"react-dom": "^16.6.0",
```
shaikdev2 pushed a commit to shaikdev2/transition-group-react that referenced this pull request Jun 9, 2023
# [3.0.0](reactjs/react-transition-group@v2.9.0...v3.0.0) (2019-04-15)

### Features

* use stable context API ([#471](reactjs/react-transition-group#471)) ([aee4901](reactjs/react-transition-group@aee4901)), closes [#429](reactjs/react-transition-group#429)

### BREAKING CHANGES

* use new style react context

```diff
// package.json
-"react": "^15.0.0",
+"react": "^16.6.0",
-"react-dom": "^15.0.0",
+"react-dom": "^16.6.0",
```
GreenCat1996 added a commit to GreenCat1996/react-transition-group that referenced this pull request Aug 1, 2023
# [3.0.0](reactjs/react-transition-group@v2.9.0...v3.0.0) (2019-04-15)

### Features

* use stable context API ([#471](reactjs/react-transition-group#471)) ([aee4901](reactjs/react-transition-group@aee4901)), closes [#429](reactjs/react-transition-group#429)

### BREAKING CHANGES

* use new style react context

```diff
// package.json
-"react": "^15.0.0",
+"react": "^16.6.0",
-"react-dom": "^15.0.0",
+"react-dom": "^16.6.0",
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants