eclipsesource / eclipsesource/tabris-js
Enable using lambdas as Stateless Functional Components
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Description
### Problem description
Currently it is not possible to use lambdas as stateless functional components, since they cannot be used as a constructor:
https://github.com/eclipsesource/tabris-js/blob/da6d2595d30d8813b93bc89e4495eb8e29a03cb3/src/tabris/JSX.js#L14
The call to `new` in the example above throws an exception.
### Expected behavior
It should be possible to use lambdas as SFCs. It is easier to declare their signature, they don't bind `this` and are shorter to write.
### Environment
- Tabris.js version: 2.5
### Code snippet
```javascript
import {ui} from 'tabris';
let SimpleSfc = () => ;
ui.contentView.append(
);
```
Contributor guide
Assessment
This issue has not been assessed yet.