0

I am trying to write my own scalajs-react components by wrapping existing JS-react components, so that they can be used from scala.js.

I am trying to understand how to do that by understanding how it is done here.

The problem is that I don't really understand macros very well, so I would like to rewrite this line without the use of macros.

How can I do that ?

jhegedus
  • 20,244
  • 16
  • 99
  • 167
  • 1
    You don't need to understand how macros work to be able to *use* them. And in this case it seems like you really just have to copy that line over to your component, and forget about it. You *could* of course write by hand the (probably monstrous) code that is generated by the macro instead of calling the macro, but that probably defeats the entire purpose of scalajs-react components. The motivation of your question is not clear enough for a better answer, IMO. – sjrd Oct 05 '16 at 08:40
  • Thanks ! I try to figure out how to do that. It's not clear yet to me how can use these macros in my own code. – jhegedus Oct 05 '16 at 08:54
  • I guess I just can add this as a dependency : https://mvnrepository.com/artifact/com.github.chandu0101.scalajs-react-components/macros_sjs0.6_2.11 – jhegedus Oct 05 '16 at 10:00

0 Answers0