peerlibrary / meteor-blaze-components

Reusable components for Blaze
http://components.meteorapp.com/
BSD 3-Clause "New" or "Revised" License
354 stars 26 forks source link

Interfacing with react.js #147

Open janat08 opened 7 years ago

janat08 commented 7 years ago

Would it possible to try and interface with react.js, since the idea with OOP components is that they're shareable where react.js has more popularity.

janat08 commented 7 years ago

this belongs in common package supposedly.

janat08 commented 7 years ago

is that something that could even be well done, where you use react for boiler plate that would come with writing a widget avoiding react.js easily.

mitar commented 7 years ago

I do not understand what you have in mind here?

janat08 commented 7 years ago

I suppose mapping api calls between each other such that you can override them and etc, so that importing react component doesn't mean that it's alien or that you have to write in react.js further down the chain. I hardly know react.js.

janat08 commented 7 years ago

edited

class convertedWidget extends ReactConverter
mixin(){return [reactWidget]}

They say react.js constantly breaks it API and has no computed property or if for that matter. So basically you take it's render() method and create a template out of it that you then pass into convertedWidget template() method. With like 3 state management packages for react and it being able to compile to native mobile, it should be easy to recompile to blaze-components.

mitar commented 7 years ago

Yes. That was somehow planned with the whole idea of base component which would then be extended into react and blaze component. But then, somehow I never got to do it.