is it possible to use react.js(scalajs-react) with lift-web?

256 views
Skip to first unread message

张宁

unread,
Nov 2, 2015, 4:41:29 AM11/2/15
to Lift
i am not a programmer, but i am interested in how to make the browser more expressive. Such as "template/wiki tags" in mediawiki, "directive" in angularjs, "snippet in lift-web", "components in react.js".

i have learned that   lift-ng integrated lift-web with angularjs, that's great! But i am wondering is it possible to use lift-web with scalajs-react.

Because i think lift-web handles data between server and client perfectly. and react is good at client data and rendering, if those two works toghter, seems good.

Antonio Salazar Cardozo

unread,
Nov 3, 2015, 1:12:26 PM11/3/15
to Lift
I haven't looked into scalajs-react in depth, but there's no reason why it shouldn't
be able to work with Lift in theory… But again, I don't know too much about what it
does.
Thanks,
Antonio

张宁

unread,
Nov 5, 2015, 2:51:32 AM11/5/15
to lif...@googlegroups.com
 i am not totally  understand those  frameworks(reactjs,scalajs, scalajs-react, liftweb), still i think it's hard to use scalajs-react with liftweb.

1:scalajs provides ways to write javascript code in scala language which compiles  "scala" code into "js" code , then the coders just include this "js" code in ".html" files, from this point of view, it is convenient to working with liftweb
2:scalajs-react seems provide own Router which invokes the components(pure scala language) directly and does the render work, have nothing to do with the .html code.  Which means scalajs-react do all the things, but i am still want to use the comet features of liftweb, that's a problem to me.

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

张宁

unread,
Nov 5, 2015, 5:13:08 AM11/5/15
to Lift
i am not totally  understand those  frameworks(reactjs,scalajs, scalajs-react, liftweb), still i think it's hard to use scalajs-react with liftweb.

1:scalajs provides ways to write javascript code in scala language which compiles  "scala" code into "js" code , then the coders just include this "js" code in ".html" files, from this point of view, it is convenient to working with liftweb
2:scalajs-react seems provide own Router which invokes the components(pure scala language) directly and does the render work, have nothing to do with the .html code.  Which means scalajs-react do all the things, but i am still want to use the comet features of liftweb, that's a problem to me.

在 2015年11月2日星期一 UTC+8下午5:41:29,张宁写道:

Antonio Salazar Cardozo

unread,
Nov 5, 2015, 4:07:09 PM11/5/15
to Lift
I don't know about its router, but I would hope scalajs-react has a precompile option
(which would make the most sense) for deployment. If it does, this seems like the ideal
way to integrate with Lift (precompile your scalajs-react stuff into a directory under webapp).
If not, then you should also be able to either put scalajs-react's router in as another entry
in web.xml, or set up Lift to pass things that it needs to handle through to it.

Probably not the most trivial thing in the world, but also probably not impossible.
Thanks,
Antonio

Joe Barnes

unread,
Nov 7, 2015, 10:29:41 AM11/7/15
to Lift
This thread is making my itch to try Lift templates with scala.js even worse. :P

Joe

0832

unread,
Nov 7, 2015, 8:13:03 PM11/7/15
to lif...@googlegroups.com
I found a play-scalajs project which used crossProject to integrade "js-project","jvm-project","shared-project".
https://github.com/hussachai/play-scalajs-showcase

Maybe it can help.
发自我的 iPhone
--
Reply all
Reply to author
Forward
0 new messages