Git Product home page Git Product logo

Comments (10)

matthughes avatar matthughes commented on July 24, 2024

Have you started this yet? I'm taking a stab at it over here https://github.com/matthughes/scalajs-react/tree/v0.12 though I'm pretty new to both react and ScalaJS.

from scalajs-react.

matthughes avatar matthughes commented on July 24, 2024

So I haven't gotten very far besides doing some renaming. I've broken the demos by trying to introduce createElement here:

+++ b/core/src/main/scala/japgolly/scalajs/react/vdom/VDomBuilder.scala
@@ -40,6 +40,6 @@ private[vdom] final class VDomBuilder {

   def render(tag: String) = {
     if (hasStyle) set(props, "style", style)
-    React.DOM.applyDynamic(tag)(vdomArgs: _*).asInstanceOf[ReactOutput]
+    React.createElement(tag, null, null).asInstanceOf[ReactOutput]

FYI: I found the type mapping at the bottom of this page helpful https://gist.github.com/sebmarkbage/fcb1b6ab493b0c77d589#react-elements. Though it's a little hard to line up with the types in this project.

from scalajs-react.

japgolly avatar japgolly commented on July 24, 2024

Hey Matt. Nah I haven't started on this yet. I haven't looked very deeply so I'm not sure what kind of changes are required but if you're gonna take a determined crack at this do have a look at the unit tests, you'll probably want to add a few more. If you have PhantomJS installed run, them with fastOptStage::test instead of normal test, it'll be faster. There's even an SBT alias installed so you just type t from SBT. :)

from scalajs-react.

matthughes avatar matthughes commented on July 24, 2024

Made a bit more progress. Still trying to get key/ref moved into the right place. In 0.11.z, they lived on props, now they just live on the component. Any chance you want to hangout on irc / Google Hangouts to try and make more progress?

from scalajs-react.

japgolly avatar japgolly commented on July 24, 2024

Sorry man, firstly I'm more into async communication than sync, unless I'm being paid for it 😉 But more importantly I've got many things on my plate right now that have declared themselves more important. Before too long I will visit this issue.

Some passing advice though, all the types in scalajs-react are about representing the rules and processes of React itself. I usually start by looking at the JS in isolation to understand where everything needs to go and how, then you just enforce that in the type system. I hope that helps, maybe?

from scalajs-react.

japgolly avatar japgolly commented on July 24, 2024

Got a coffee, got some good music on, time to have a crack at this.

from scalajs-react.

japgolly avatar japgolly commented on July 24, 2024

Nearly there. Few easy things left to do and one very disconcerting issue to fix. I am concerned.

japgolly.scalajs.react.CoreTest.children.argsToComponents.listOfScalatags

Progress so far:
https://github.com/japgolly/scalajs-react/compare/react-0.12

from scalajs-react.

japgolly avatar japgolly commented on July 24, 2024

Got it. I believe all the hard stuff is over for this. This issue should be closable soon.

from scalajs-react.

japgolly avatar japgolly commented on July 24, 2024

Merged into master.

from scalajs-react.

japgolly avatar japgolly commented on July 24, 2024

Btw, thanks @matthughes for the attempt on this. Unfortunately it turned out to be as annoying a change as I'd feared. Way too complex for someone just getting acquainted with both libraries. Thanks for effort.

from scalajs-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.