Fragment usage
Open
documentation
enhancement
medium-priority
question
- Dominant language
- TypeScript
- Stars
- 321
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to render a list [as shown in the example](https://github.com/forgojs/forgo#rendering-lists-and-using-keys) but it assumes rendering a single element.
```
const list = [
{ key: 'a', value: '1' },
{ key: 'b', value: '2' }
];
const Example = () => new forgo.Component({
render() {
return list.map(item => [
{item.key}
,{item.value}
])
}
});
```
In React, you could wrap listed items like this into a fragment which you can attach a key to.
```
return list.map(item => [
{[
{item.key}
,{item.value}
]}
])
```
How would you do this in forgo?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.