You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Invariant Violation: Objects are not valid as a React child ... If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object)
#5168
Closed
almeynman opened this issue
Oct 14, 2015
· 2 comments
everything renders fine, however when clicking the
element I receive the following error:
Uncaught Error: Invariant Violation: Objects are not valid as a React child (found: object with keys {dispatchConfig, dispatchMarker, nativeEvent, target, currentTarget, type, eventPhase, bubbles, cancelable, timeStamp, defaultPrevented, isTrusted, view, detail, screenX, screenY, clientX, clientY, ctrlKey, shiftKey, altKey, metaKey, getModifierState, button, buttons, relatedTarget, pageX, pageY, isDefaultPrevented, isPropagationStopped, _dispatchListeners, _dispatchIDs}). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. Check the render method of `Welcome`.
If I change to this.onItemClick.bind(this, item) to (e) => onItemClick(e, item) inside the map function everything works as expected.
The text was updated successfully, but these errors were encountered:
In my component's render function I have:
everything renders fine, however when clicking the
If I change to
this.onItemClick.bind(this, item)
to(e) => onItemClick(e, item)
inside the map function everything works as expected.The text was updated successfully, but these errors were encountered: