DEV Community

Discussion on: RxComp a modern ES6 alternative to Angular component framework

Collapse
 
actarian profile image
Luca Zampetti

@Kostia Thank You! This is really interesting, I like the neat syntax of the jsx template.

I will dive soon on preact or react.

I've just readed your article and found it very inspiring! ^ ^

I think we both like rxjs and want to use it as the way to handle component state!

And thank you for the router5 tip too!

Collapse
 
kosich profile image
Kostia Palchyk

I think we both like rxjs

We do :)

want to use it as the way to handle component state!

State aaand side-effects with async events management and auto cancellation!
I see, you have "Automatic Subscription / Unsubscription" and "OnPush Strategy" -- great features!

(I'm actually in the middle of writing an article about state-management :) )

Also, if you're looking for a SSOT storage with Observable API:
In the scope of the framework project, I've created this:
github.com/recksjs/redogs
It's a redux-like storage with redux-observable interface and a TS support.

preact or react

From what I've seen, preact has the same as react. Same API / feature set, just has less run-time error-proof handling logic.

People often find JSX a blocker, cause it's violating MV* principle. Yet, once you use a ng-repeat or ng-if in your template — you realize that you're adding logic to the View. Since you're adding logic to the View -- why not adding it using JS? You're still developing the View, just using tools you know for years.

I've tried React after a couple of years of Angular (1,2+). And found JSX awesome.
The frustrating part was the data-flow: you can't directly refer to a component child and call a method on it. Rather it's about passing callbacks around and updating parent state to update the child. Aaaand, obviously, Rx is not really native to React ;)

Anyhow, I wish you to have an interesting journey with RxComp and the rest!
Cya!

Thread Thread
 
actarian profile image
Luca Zampetti

People often find JSX a blocker, cause it's violating MV* principle. Yet, once you use a ng-repeat or ng-if in your template — you realize that you're adding logic to the View. Since you're adding logic to the View -- why not adding it using JS? You're still developing the View, just using tools you know for years.

Yep, I agree, still I think it's not matter of who's better, every tool has its pros and cons and you have to find what is best suited for the job. I like the idea to learn as many tools as possible and to take from each one its best.

Thank you again for all the hints! )