Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Solves #109 client variable-reference #130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

enkelmedia
Copy link

Solves issue #109 by adding client varible.

@enkelmedia enkelmedia mentioned this pull request Jan 21, 2021
@swalkinshaw
Copy link
Collaborator

Doesn't every usage of this.props.client need to be changed to just client now that the constant is defined?

@swalkinshaw
Copy link
Collaborator

I don't really understand how this fixes the issue though 🤔

The prop should exist:

Plus const client = this.props.client; implies it does exist

@enkelmedia
Copy link
Author

enkelmedia commented Jan 22, 2021

I just started the Example site with npm run start, got the error, added this code and it worked. I haven’t spent a lot of time looking at why.

Might be more places where something similar is needed, might be a build-confit issue - I don’t know but this made the “add to cart” work which at least made the example useful.

Edit: I’m sure that the prop exists but one can’t just use the name of the prop, the code I’ve added creates a variable, it would probably work to just prepend this.props to the client variable usage.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants