-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
[RFR] Reference hooks #3228
Conversation
import { crudGetManyAccumulate as crudGetManyAccumulateAction } from '../../actions'; | ||
import { linkToRecord } from '../../util'; | ||
import { Record, Dispatch } from '../../types'; | ||
import { SFC, ReactNode, ReactElement } from 'react'; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference: DefinitelyTyped/DefinitelyTyped#30364
There was a problem hiding this 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={{ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 ....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What rebase ?
Refactor ReferenceFieldController using hooks and introduce useReference hooks.
ReferenceMany will follow.