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

4. Adding Items - Issue with props vs refs #2

Open
trivopr opened this issue Dec 10, 2016 · 0 comments
Open

4. Adding Items - Issue with props vs refs #2

trivopr opened this issue Dec 10, 2016 · 0 comments

Comments

@trivopr
Copy link

trivopr commented Dec 10, 2016

Hi Ray,
I get a problem in Section 4. Adding Items.
When i click: toggleAptDisplay and code below

	toggleAptDisplay() {
		this.props.handleToggle();
	}

	handleAdd(e) {
		let objItem = {
			petName: this.refs.inputPetName.value,
			ownerName: this.refs.inputOwnerName.value,
			aptDate: this.refs.inputAptDate.value + ' ' + this.refs.inputAptTime.value,
			aptNotes: this.refs.inputAptNotes.value		
		} // objItem

		e.preventDefault();
		this.props.addApt(objItem);
	} // handleAdd

Console log is : Uncaught TypeError: Cannot read property 'props' of null(…)
The above problem on Refs is the same. Help me plz,
Thanks.

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

No branches or pull requests

1 participant