recksjs / recks Goto Github PK
View Code? Open in Web Editor NEW๐ถ React-like RxJS-based framework
Home Page: https://recks.gitbook.io/
License: MIT License
๐ถ React-like RxJS-based framework
Home Page: https://recks.gitbook.io/
License: MIT License
I was very interested in this project. Do you mind if I add .editorconfig and prettier here?
There is already reactive framework :)
As reported in recksjs/recks-starter-project#4, TS accepts components to be both:
// VALID
function Foo(props$: Observable<{ value: string}> ) {
return <div>{props$.pipe(map(x => x.value))}</div>
}
// INVALID, BUT ACCEPTED BY TS
function Bar(props: { value: string } ) {
return <div>{props.value}</div>
}
Though Recks TS definitions for JSX allow use of both:
const timer$ = timer(0, 1000);
{timer$.pipe(map(value => <Foo value={value}/>))}
{timer$.pipe(map(value => <Bar value={value}/>))}
The Bar
type is incorrect, since components currently only accept Observable<โฆ>
as props
, and TS should throw an error in this case.
Thanks, @user753 , for reporting this!
Currently we allow intrinsic elements to receive Observable attributes, e.g.:
<img src={ of('/bird.png') } /> // > ๐ฆ
Components don't support this feature yet, and passing an Observable to a component results in Component to be of type fn (props$: Observable<{ [key: string]: Observable<โฆ> }>)
, which leads to boilerplate code. E.g:
<Header title={ of('title') } />
function Header(props: Observable<{ title: Observable<string> }>) {โฆ}
With components it's unclear how exactly the API should look like: props: Observable<{ title: string }>
or props: { title: Observable<string> }
or a combination of two, or something else.
This issue is a place for further discussions and investigations of this API.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.