Fork me on GitHub
#reagent
<
2016-12-15
>
upgradingdave15:12:57

hi all, my ignorance of javascript is getting in the way here. I’d like to try using this react component in reagent: https://github.com/joshwcomeau/react-flip-move

upgradingdave15:12:41

but when I include <script src=”https://unpkg.com/[email protected]/dist/react-flip-move.js”> </script>, js/FlipMove is still undefined?

upgradingdave15:12:54

I’d like to be able to try something like this: (def flip-move (r/adapt-react-class js/FlipMove))

upgradingdave15:12:48

but I’m confused about how this FlipMode react component gets loaded into the browser page? If it’s not under js/FlipMove anyone know where to look off the top of their head?

seantempesta18:12:02

React Interop Question: How do do this with reagent on a react component?

class HomeScreen extends React.Component {
  /**
    * This is where we can define any route configuration for this
    * screen. For example, in addition to the navigationBar title we
    * could add backgroundColor.
    */
  static route = {
    navigationBar: {
      title: 'Home',
    }
  }

  render() {
    return (
      <View style={{alignItems: 'center', justifyContent: 'center', flex: 1}}>
        <Text>HomeScreen!</Text>
      </View>
    )
  }
}

seantempesta18:12:09

The render function is straightforward. But how do I create the route attribute?

savelichalex18:12:37

@seantempesta Is it react-native-navigation?

seantempesta18:12:52

yeah. well, ex-navigation

savelichalex18:12:51

Just react-native-navigation have the same configs 😄 and they also provide another options to do that)

seantempesta18:12:46

It seems pretty different. Isn’t that a native navigation solution? Like completely different than ex-navigation which uses NavigationExperimental?

savelichalex18:12:31

that's right) but configs looks similar)

seantempesta18:12:22

Is it stable? It looks like they are in the middle of a major api rewrite.

savelichalex18:12:37

Hm, depends from your RN current version, I'm using it with 0.25 and have some small patches, but in general works fine and fast 😄 But you are right, they now rewrite api

seantempesta18:12:17

Yeah, I can’t use that. I’m on a much later version of RN. Thanks for the info though.

savelichalex18:12:57

I will try to answer on your original question anyway) What if you create class with (r/create-class) and then do aset on this instance?

seantempesta19:12:57

@savelichalex: Nope. Now I’m getting this error: ExceptionsManager.js:71 Warning: Something is calling a React component directly. Use a factory or JSX instead.

richiardiandrea20:12:15

@ericfode @yogthos I will be on the "cljs over node" boat soon, shall we open a channel ?

yogthos20:12:27

@richiardiandrea That is the plan, there is a macchiato channel now

terje21:12:13

Created #cljsnode for ClojureScript on Node

richiardiandrea21:12:20

@terje I have already created it 🙂

richiardiandrea21:12:39

#cljs-node, I should have announced it here as well duh