New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow scala seq/maps as callback function parameters #5
Comments
Here is an outline of how we might do it. Given a component with the following as one of its case class parameter:
The macro will create a js properties to be set for the underlying component:
Essentially, we transform the argument with code that is a dual of scalajs-react-bridge/src/main/scala/com/payalabs/scalajs/react/bridge/package.scala Line 21 in 8bc3b80
|
Any progress on this? |
Unfortunately, I haven't had a chance to work on this. |
Fixes payalabs#5 - Code-generated function instances use an instance to convert their return value - That obviates codegen for Callback-returning functions - Richer set of JsWriter instances - No "fallback" JsWriter for any type - JsWriter convenience factory simplifies defining instances - Don't handle Option parameters specially in the macro; let the typeclasses do the work - Simplify propsToDynamic
Currently, we transform
Seq
andMap
parameters to case classes tojs.Array
and literal, but still require parameters to callback functions to be of js types (seeonChange
of TagsInput for example). It will be nice to allow callbacks to specify normal Scala types.The text was updated successfully, but these errors were encountered: