Fork me on GitHub
#reagent
<
2016-04-23
>
eyelidlessness00:04:48

is there a preferred pattern for snapshotting an ratom, to e.g. compare in-memory state with state fetched from a server?

eyelidlessness00:04:25

in clojure i'd be looking at refs at this point, but i'm really lost how i should approach this in clojurescript

tom18:04:03

I'm trying to figure out out reactify-component and create-class and related functions can be used to great components that can be used from React. Like

import myReagent from 'my-reagent'
class Example extends React.Component {
  render() {
    return (
      <myReagent
       x = "property1"
       />
    );
  }
}

tom18:04:55

Is that possible?

tom22:04:08

Ok, looks like reagent 0.6.0-alpha has this but I just have to figure out how to expose myself there

tom22:04:26

The output of create-class can now be used directly in JSX.
”Native React components” can now be used directly in Reagent’s hiccup forms, using this syntax: [:> nativeComp {:key "value"}]. This might sometimes be more convenient than using adapt-react-class.
Reagent should now also be a bit easier to use in node.js. If global React is not defined (i.e React, ReactDOM and ReactDOMServer), Reagent tries to use require instead, to get react, react-dom and react-dom/server from npm.
http://reagent-project.github.io/news/news060-alpha.html