by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 11 2019 09:03

    janbiedermann on master

    update config for example and t… (compare)

  • May 11 2019 08:43

    janbiedermann on master

    further readme split up (compare)

  • May 11 2019 08:24

    janbiedermann on master

    fix travis config (compare)

  • May 11 2019 08:21

    janbiedermann on master

    fix links (compare)

  • May 11 2019 08:19

    janbiedermann on master

    exclude specs in fixtures clean up a bit corrections in readme and 8 more (compare)

  • May 11 2019 06:09

    janbiedermann on master

    update branch for compilation t… add es6_modules_string branch t… (compare)

  • May 10 2019 20:11

    janbiedermann on master

    let var be let (compare)

  • May 10 2019 18:42

    janbiedermann on master

    add test to execute ruby with c… (compare)

  • May 10 2019 17:18

    janbiedermann on master

    update doc for branches and PRs (compare)

  • May 10 2019 13:00

    janbiedermann on master

    keep test_apps folder for tests (compare)

  • May 10 2019 12:21

    janbiedermann on master

    simplify a bit spec add owl to dependencies test for 'public/assets' add te… and 2 more (compare)

  • May 09 2019 21:53
    francescoagati closed #2
  • May 09 2019 21:53
    francescoagati commented #2
  • May 09 2019 21:47
    janbiedermann commented #2
  • May 09 2019 16:02
    francescoagati opened #2
  • May 09 2019 16:01
    francescoagati starred isomorfeus/opal-webpack-loader
  • May 04 2019 02:19

    janbiedermann on master

    document file tree more accurat… (compare)

  • May 03 2019 16:30
  • May 03 2019 15:42

    janbiedermann on 0.7.3

    (compare)

  • May 03 2019 15:41

    janbiedermann on 0.7.3

    (compare)

Isomorfeus Robot
@isomorfeusbot
[slack] <janbiedermann> To better support React Native and things i am dropping support for :preact: preact and NervJs
[slack] <janbiedermann> Well, it may still work with :preact: , but i no longer test or make an effort to support it.
Isomorfeus Robot
@isomorfeusbot

[slack] <janbiedermann> upcoming i-react release allows for method_ref to pass args. Thats useful for event handlers, to pass additional args based on context.
Example:
```def my_handler(event, info, arg)
puts arg
end

render do
DIV(on_click: method_ref(:my_handler, "first DIV"))
DIV(on_click: method_ref(:my_handler, "second DIV"))
end```

[slack] <janbiedermann> my_handler then received the original event/info plus the args passed to method_ref.
[slack] <janbiedermann> cc @Tomasz Lemkowski
Isomorfeus Robot
@isomorfeusbot
[slack] <Tomasz Lemkowski> 👍
[slack] <Tomasz Lemkowski> Super nice
Isomorfeus Robot
@isomorfeusbot
[slack] <Diego> Is there a place to report problems with isomorfeus hello world?
I am able to run the isomorfeus-website project locally but creating a new project gives me this error:
18:03:54 web.1 | ERROR: Iodine caught an unprotected exception - RuntimeError: Isomorfeus in development on Server:
18:03:54 web.1 | Server Side Rendering: Failed loading asset http://localhost:3036/assets/web_ssr.js from webpack dev server, asset is not javascript. Did the webpack build succeed?
Isomorfeus Robot
@isomorfeusbot

[slack] <janbiedermann> Hi Diego,

the most recent release is zeta25, please install zeta25 and try again to create a new project.

Isomorfeus Robot
@isomorfeusbot
[slack] <janbiedermann> You can check if you have the latest and greatest here: https://github.com/orgs/isomorfeus/packages
Isomorfeus Robot
@isomorfeusbot
[slack] <janbiedermann> @Diego this is the right place to report problems
I updated the website to reflect latest version.
Isomorfeus Robot
@isomorfeusbot
[slack] <Diego> Thanks, I tried zeta25, but still get the same error
[slack] <janbiedermann> oops, sorry, i will try myself and fix
Isomorfeus Robot
@isomorfeusbot

[slack] <janbiedermann> @Diego i just remembered whats the issue, i think, did not have time to test yet. The default asset name for SSR changed because of the preparation for React Native, in your project root, the your_app.rb roda app, there is a mount_component method call, that needs a param at the end. I think you need to add 'application_ssr.js'.

The default changed to 'web_ssr.js', but that change i think is so far only in i-react, which is a bit ahead of :isomorfeus: zeta25

Isomorfeus Robot
@isomorfeusbot
[slack] <janbiedermann> Also you can turn off SSR temporarily by adding Isomorfeus.server_side_rendering = false above the Roda app
Isomorfeus Robot
@isomorfeusbot
[slack] <janbiedermann> @Diego does it work?
Isomorfeus Robot
@isomorfeusbot
[slack] <Diego> Isomorfeus.server_side_rendering = false worked```
[slack] <janbiedermann> 👍
[slack] <janbiedermann> zeta26 will come soon
[slack] <Diego> Not sure what key I was supposed to use for application_ssr.js
[slack] <janbiedermann> not sure what you mean 'key'?
[slack] <janbiedermann> oh, i think i understand
Isomorfeus Robot
@isomorfeusbot
[slack] <janbiedermann> mount_component('IsomorfeusWebsiteApp', { location_host: env['HTTP_HOST'], location: location, locale: locale }, 'application_ssr.js')
[slack] <janbiedermann> no key
Isomorfeus Robot
@isomorfeusbot
[slack] <Diego> cool, that works too
[slack] <janbiedermann> 👍
[slack] <Diego> finally found the method definition 🙂
Isomorfeus Robot
@isomorfeusbot

[slack] <frédéric ZINGG> @janbiedermann I'm trying to introduce the GSAP animation ibrary (https://greensock.com/) into the isomorfeus-website
On their Helloworls youtube video (https://www.youtube.com/watch?v=znVi89_gazE) they talk about : "React useEffect Hook"

I guess it is easy to transpose that sor of REACT useEffect hook with :isomorfeus: ?
https://medium.com/trabe/react-useeffect-hook-44d8aa7cccd0

Isomorfeus Robot
@isomorfeusbot

[slack] <janbiedermann> Sure it easy with :isomorfeus: , you will have to use a Func component, then you can use hooks. For the website, that would be LucidMaterial::Func. See also the extensive documentation here https://github.com/isomorfeus/isomorfeus-react/blob/master/ruby/docs/lucid_func_component.md .
useEffect is a default React Hook and like any other React Hook you can just call it like:
use_effect

some conversion of args is done, but i am not sure, ymmv, just complain if something does not work and i fix

Isomorfeus Robot
@isomorfeusbot
[slack] <frédéric ZINGG> @janbiedermann Just to understand and if you have time to answer:
I read this article about "React suspense" (fetching asynchronous data)
It looks to me all that sort of things is provided by default with :isomorfeus: , right, or I miss something ?
https://medium.com/trabe/fetching-asynchronous-data-with-react-suspense-8814eaf6a2c6
[slack] <janbiedermann> right
Isomorfeus Robot
@isomorfeusbot
[slack] <janbiedermann> it is still a experimental feature in react, so :isomorfeus: does not yet support it directly
But maybe, the implementation of preload in :isomorfeus: will depend on suspense or so. I better wait for the final release.
[slack] <frédéric ZINGG> ok, I read more about "React suspense" to understand what it does exaclty. tx.
[slack] <janbiedermann> its just a nice way to do asynchronous things together with render
Isomorfeus Robot
@isomorfeusbot
[slack] <frédéric ZINGG> I'm not sure, in this REACT pice of code (with useEffect hook.
The header const, is a props ?: https://files.slack.com/files-pri/THYSYJT0F-F011BFS0HV3/download/image.png
[slack] <janbiedermann> yeah that works a bit different for function components

[slack] <janbiedermann> usually you pass the ref prop and it will be filled with the ref, here the ref is created beforehand and then passed as props

so that ref provides access to h1

[slack] <janbiedermann> so first:
create ref
second:
pass ref to useEffect
third:
pass ref to h1

during render:
h1 will fill ref with value
useEffect will be called, can access h1 via ref

[slack] <janbiedermann> useEffect is a bit like componentDidMount
[slack] <frédéric ZINGG> ok, got it tx.
So do I also have to use something like `
React.createRef();
to create the ref initial value ?
Isomorfeus Robot
@isomorfeusbot
[slack] <janbiedermann> yes, that should just work: React.create_ref
[slack] <janbiedermann> in ruby
[slack] <janbiedermann> you get however a ruby ref
[slack] <janbiedermann> so if you pass that on to h1 you need to use to_n
[slack] <janbiedermann> not sure, ymmv, maybe we need to work on that a bit
[slack] <janbiedermann> i see, just looked at the code, i intended the conversion to be automatic, but that may not be the case actually
[slack] <janbiedermann> you will see, i will fix then
Isomorfeus Robot
@isomorfeusbot
[slack] <frédéric ZINGG> @janbiedermann with useEffect , one thing I'm not sure to understand (must be because i'm not familiar with JS syntax):
in isomoerfeus_react source code I can see:
def use_effect(&block) `Opal.global.React.useEffect(function() { #{block.call} })` end
but in the REACT example we pass that (1 block + 1 array of ref):