How do you pass props into ‘foo’ and ‘bar’ component? For example,
openbeta.io
1

I haven’t tried it myself but i think you should be able to use the spreader operator in combination with this technique.

// Pass the props to the component as an object
const props = {foo: '123', bar: '456'};
<MyComponent tag="foo" myProps={props}/>
// Use spread in the render function
render() {
const TagName = this.props.tag;
return <TagName {...this.myProps} />
}

I will probably give this a try a some point and amend the post.