I have the following code on my render:
<TourHeader key="TourHeader" {...this.props, ...this.state} />
I get the following error:
Syntax error: Unexpected token, expected }
Only this was working:
<TourHeader key="TourHeader" {...this.props} />
How do I solve this?
You can spread them separately:
<TourHeader key="TourHeader" {...this.props} {...this.state} />