Fork me on GitHub
#rum
<
2017-04-10
>
Niki05:04:40

@rauh what’s teh idea? where does perf improvement come from?

rauh05:04:36

@tonsky Well I wanted to avoid the createClass since React will eventually get rid of it and many features of createClass isn't needed by Rum. And then I switched some code to JS instead of CLJ construct along the way

rauh05:04:08

Not really saying that this is how rum.core should look like, I just wanted to dump this in case anybody else is working on avoiding createClass.

Niki06:04:29

Well, that's great, thanks for sharing this

yonatanel14:04:12

Can I generate components from data (which may contain function names/objects) without using defc?

yonatanel15:04:20

Also, where does rum shines in comparison with reagent? They're both kinda almost all data, with optional React hooks, from what I've seen.

rauh15:04:53

@yonatanel 1. Yes you can, just copy the build-ctor function from rum core as a starting point and you can add all kinds of logic.

rauh15:04:56

A few fun stuff I do there (some only in dev): 1. Flash (a css outline) upon rerender and different color upon remount 2. Automatically assign key as the :db/id of some argument (nice with datascript) 3. Add some meta data to the component to register every mounted instance and allow to inspect the state/props of all the instances.

Niki16:04:11

@yonatanel Rum is more flexible and less opinionated. Some things are very rigid in Reagent, but you can use Rum any way you want