And then there is:
render() { const personToLookFor = 'Thierry' const [result, loading] = doesPersonExist(personToLookFor) if (loading) return 'Loading...' return result ? `${personToLookFor} already exists.` : `${personToLookFor} doesn't exist.`; }
Besides: Your function doesPersonExist() should take personToLookFor as a parameter - unless it's magical aware of what you want. ;)
doesPersonExist()
personToLookFor
Thank you for reporting it Thomas, I fixed it 👍
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
And then there is:
Besides: Your function
doesPersonExist()
should takepersonToLookFor
as a parameter - unless it's magical aware of what you want. ;)Thank you for reporting it Thomas, I fixed it 👍