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

fix(TabContainer): Resolve lifecycle deprecation #4370

Merged
merged 2 commits into from
Sep 4, 2019
Merged

fix(TabContainer): Resolve lifecycle deprecation #4370

merged 2 commits into from
Sep 4, 2019

Conversation

nortonwong
Copy link
Contributor

Replace uncontrollable with equivalent useUncontrolled.

Fixes #4368.

Copy link
Member

@taion taion left a comment

Choose a reason for hiding this comment

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

nice!

@taion
Copy link
Member

taion commented Aug 30, 2019

note the CI junk around lint though \:

'`generateChildId` prop to TabContainer is required',
);
}
/* eslint-disable react/no-unused-prop-types */
Copy link
Member

Choose a reason for hiding this comment

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

@jquense bleh, is there a better way to do this? alternatively, why isn't this triggering for e.g. <Alert>? does this rule just not work for React.forwardRefs?

Copy link
Member

Choose a reason for hiding this comment

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

hah, i guess it just doesn't work for ForwardRef things...

Copy link
Contributor Author

@nortonwong nortonwong Sep 4, 2019

Choose a reason for hiding this comment

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

It does work for forwardRef, just not for prop spread. If a component spreads props into a child, the lint rule passes:

const Alert = _props => <div {...{}} />;

Most forwardRef components also spread remainder props, so they already trigger this behavior.

Copy link
Member

Choose a reason for hiding this comment

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

ah okay. well, whatever. thanks!

Copy link
Member

@bpas247 bpas247 left a comment

Choose a reason for hiding this comment

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

Looks great so far 😁

src/TabContainer.js Show resolved Hide resolved
src/TabContainer.js Show resolved Hide resolved
Copy link
Member

@taion taion left a comment

Choose a reason for hiding this comment

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

ok, fine by me unless @jquense has a better idea for how to deal with the lint issue

@bpas247 bpas247 added the bug label Aug 31, 2019
@taion taion merged commit 8103448 into react-bootstrap:master Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please update the following components Unctrolled(TabContainer)
3 participants