Search code examples
ruby-on-railsreact.rb

Not showing data with react.rb


I'm just trying to use ReactRB with reactive-record.

So the deal is in render part I think. When I'm setting param :user, type: User in React Component class, I can't see any data in my table. Of course Model User in public folder, as this requirement in ReactRB.

Well, in console I see that server is fetching nothing, but right data returned.

What I'm missing? Thanks for the help!

The key for answer is in this screenshot

The details are that the data comes back from the server as a json blob reactive-record decodes it, but counts on the fact that if you try to json parse a simple string, it raises an error. opal 0.10 no longer raises standard error, so the whole thing just hangs up.


Solution

  • Just thinking about this... there is a known problem in Opal https://github.com/opal/opal/issues/1545 and this causes a problem in reactive-record. Please make sure that you are not using opal 0.10