4

I am currently exploring websharper. However, the UI.Next API seems kind of sluggish. Albeit, it is still experimental. I am thinking the speed and flexibility offered by Facebook's, reactjs and it's functional design, should make a great fit. Has any tried this? How successfully? Since UI.Next is merely a library to the WebSharper framework, one might expect an adapter to the reactjs library could similarly work...

Thank in advance for your response.

George
  • 2,451
  • 27
  • 37
  • 2
    If you don't mind me asking, what in particular did you find sluggish about UI.Next? – Fyodor Soikin Mar 04 '16 at 13:24
  • 1
    @FyodorSoikin At the time, I was noticing a delay in the response from their UI.Next SinglePage template application. However, this delay appears to have gone away. Perhaps there were aspects of my machine that were causing it? – George Mar 04 '16 at 18:50

2 Answers2

2

Already does...

Found the documentation clarifying this point

(WebSharper.UI.Next is...) A reactive DOM library for displaying these time-varying values in a functional way. If you are familiar with Facebook React, then you will find some similarities with this approach: instead of explicitly inserting, modifying and removing DOM nodes, you return a value that represents a DOM tree based on inputs. The main difference is that these inputs are nodes of the dataflow layer, rather than a single state value associated with the component.

George
  • 2,451
  • 27
  • 37
1

Although UI.Next has some 'react-like' features, it explicitly avoids the Virtual Dom approach which is the key underlying technology behind React.

The result is that in order to build a complex GUI in UI.Next you need to explicitly set up the necessary observables, rather than just rendering and handling events. Personally, I find this harder and more timeconsuming, but YMMV.

There are some tantalising indications that a binding to React may be on the cards quite soon: http://websharper.com/blog-entry/4665/websharper-a-year-in-review mentions a forthcoming React library.