Skip to content

Type error mixing single and array children in tsx using class based widgets #670

@agubler

Description

@agubler

Bug

Mixing single and array children in tsx with class based widget causes a typing error.

class App extends WidgetBase {
	render() {
		return (
			<div>{this.children}</div>
		);
	}
}
const domNode = document.createElement('div');
const r = renderer(() => (
	<App>
		// causes a typing issue as mixing arrays and 
		// single items is not supported
		{[<div>first</div>, <div>second</div>]}
		{<div>third</div>}
	</App>
));

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreCorebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions