We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 213e243 commit 853654eCopy full SHA for 853654e
src/components/__tests__/Tabs-test.js
@@ -297,23 +297,8 @@ describe('react-tabs', () => {
297
298
it('should switch tabs if setState is called within onSelect', () => {
299
class Wrap extends React.Component {
300
- constructor(props, state) {
301
- super(props, state);
302
-
303
- this.state = {
304
- foo: 'foo',
305
- };
306
307
- this.handleSelect = this.handleSelect.bind(this);
308
- }
309
310
- handleSelect() {
311
- this.setState({ foo: 'bar' });
312
313
314
- render() {
315
- return createTabs({ onSelect: this.handleSelect });
316
+ handleSelect = () => this.setState({ foo: 'bar' });
+ render() { return createTabs({ onSelect: this.handleSelect }); }
317
}
318
319
const wrapper = mount(<Wrap />);
0 commit comments