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

Upgraded to new React Context API #4289

Merged
merged 14 commits into from Dec 11, 2018
Merged

Upgraded to new React Context API #4289

merged 14 commits into from Dec 11, 2018

Conversation

erikras
Copy link
Member

@erikras erikras commented Dec 9, 2018

Closes #4216

@codecov
Copy link

codecov bot commented Dec 9, 2018

Codecov Report

Merging #4289 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #4289     +/-   ##
========================================
  Coverage     100%    100%             
========================================
  Files          73      18     -55     
  Lines        1676     554   -1122     
========================================
- Hits         1676     554   -1122
Impacted Files Coverage Δ
src/ReduxFormContext.js 100% <100%> (ø)
src/ConnectedField.js 100% <100%> (ø) ⬆️
src/createField.js 100% <100%> (ø) ⬆️
src/createFormValues.js 100% <100%> (ø) ⬆️
src/ConnectedFieldArray.js 100% <100%> (ø) ⬆️
src/ConnectedFields.js 100% <100%> (ø) ⬆️
src/Form.js 100% <100%> (ø) ⬆️
src/FormSection.js 100% <100%> (ø) ⬆️
src/createFieldArray.js 100% <100%> (ø) ⬆️
src/FormName.js 100% <100%> (ø) ⬆️
... and 57 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 734be8d...08cb39b. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 9, 2018

Codecov Report

Merging #4289 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #4289   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files          73      74    +1     
  Lines        1676    1668    -8     
======================================
- Hits         1676    1668    -8
Impacted Files Coverage Δ
src/ReduxFormContext.js 100% <100%> (ø)
src/ConnectedField.js 100% <100%> (ø) ⬆️
src/util/isHotReloading.js 100% <100%> (ø) ⬆️
src/Form.js 100% <100%> (ø) ⬆️
src/FormSection.js 100% <100%> (ø) ⬆️
src/FormName.js 100% <100%> (ø) ⬆️
src/createFields.js 100% <100%> (ø) ⬆️
src/createFormValues.js 100% <100%> (ø) ⬆️
src/createField.js 100% <100%> (ø) ⬆️
src/ConnectedFieldArray.js 100% <100%> (ø) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 734be8d...8587dd1. Read the comment docs.

@dereknelson
Copy link

Is this done? Or will it be released in a new version of redux-form when it is? Excited to try redux 6.0.0 but I rely heavily on redux-form. Thanks for the hard work!

@erikras
Copy link
Member Author

erikras commented Dec 11, 2018

IT BUILDS!!!

Success

@erikras erikras merged commit 7b75f1b into master Dec 11, 2018
@erikras erikras deleted the context-api branch December 11, 2018 10:56
@erikras
Copy link
Member Author

erikras commented Dec 11, 2018

Going for a walk to clear my head before publishing. Expect it later today...

@MuneebBaderoen
Copy link

Amazing, thank you! 😄

@cereallarceny
Copy link

Wow @erikras - nice work.

@erikras
Copy link
Member Author

erikras commented Dec 11, 2018

Published as v8.0.0.

const { forwardedRef, ...rest } = this.props
return React.createElement(ReduxFormContext.Consumer, {
children: _reduxForm =>
React.createElement(Component, {
Copy link
Contributor

Choose a reason for hiding this comment

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

@erikras Possible optimization: if the Component is a functional component (typeof Component === 'function') this could drop the createElement call, just call the function directly with the props and thereby shorten the React tree by 1 component?

@nwaughachukwuma
Copy link

@erikras am having an issue with version 7. It is failing with the error:
bundling failed: Error: Unable to resolve module ./ReduxFormContext

Please what could the problem be?

@lock
Copy link

lock bot commented Jan 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants