Skip to content

issue#21#23

Open
audjo wants to merge 4 commits intodevelopfrom
feature/issue#21-events-onsubmit
Open

issue#21#23
audjo wants to merge 4 commits intodevelopfrom
feature/issue#21-events-onsubmit

Conversation

@audjo
Copy link
Copy Markdown
Collaborator

@audjo audjo commented Apr 24, 2020

Copy link
Copy Markdown
Owner

@dailymp dailymp left a comment

Choose a reason for hiding this comment

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

Just some minor details to fix here, good work! :)

import { mount } from 'enzyme';
import { NameForm } from './NameForm';
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

We can declare an configure adapter in config files instead of declare inside each test file separated

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

DOne

@@ -0,0 +1,42 @@
import React from 'react';


Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

One line should be enough here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

this.handleSubmit = this.handleSubmit.bind(this);
}

handleChange(event) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

If you convert this to lambda function then the line 13 can be deleted, and it is less code! Try it!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I don't really know what do you mean.

this.setState({ value: event.target.value });
}

handleSubmit(event) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

If you convert this to lambda function then the line 14 can be deleted, and it is less code! Try it!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I don't really know what do you mean.


import {NameForm} from './NameForm/NameForm';


Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

One line must be deleted here

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.

2 participants