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

[RFR] Reference hooks #3228

Merged
merged 8 commits into from
May 16, 2019
Merged

[RFR] Reference hooks #3228

merged 8 commits into from
May 16, 2019

Conversation

ThieryMichel
Copy link

@ThieryMichel ThieryMichel commented May 15, 2019

Refactor ReferenceFieldController using hooks and introduce useReference hooks.
ReferenceMany will follow.

import { crudGetManyAccumulate as crudGetManyAccumulateAction } from '../../actions';
import { linkToRecord } from '../../util';
import { Record, Dispatch } from '../../types';
import { SFC, ReactNode, ReactElement } from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

I think they renamed SFC into FunctionalComponent in the latest typings. Probably not a good idea to upgrade the typings in this PR though

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@djhi djhi left a comment

Choose a reason for hiding this comment

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

Awesome!

@@ -65,7 +65,7 @@ describe('ListController', () => {

const { getByLabelText } = render(
<TestContext
store={{
initialState={{
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't you use your shiny new renderWithRedux ? Same for all tests using TestContext

Copy link
Author

@ThieryMichel ThieryMichel May 15, 2019

Choose a reason for hiding this comment

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

I was afraid of the potential rebase ....

Copy link
Contributor

Choose a reason for hiding this comment

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

What rebase ?

@djhi djhi added this to the 3.0.0 milestone May 16, 2019
@ThieryMichel ThieryMichel mentioned this pull request May 16, 2019
5 tasks
@djhi djhi merged commit 8304772 into next May 16, 2019
@djhi djhi deleted the reference_hooks branch May 16, 2019 12:31
@fzaninotto fzaninotto mentioned this pull request May 16, 2019
40 tasks
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

3 participants