Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • 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


  • May 03 2019 15:41

    janbiedermann on 0.7.3


Isomorfeus Robot
[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
[slack] <frédéric ZINGG> I'm not sure, in this REACT pice of code (with useEffect hook.
The header const, is a props ?:
[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
pass ref to useEffect
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 `
to create the ref initial value ?
Isomorfeus Robot
[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
[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) ` { #{} })` end
but in the REACT example we pass that (1 block + 1 array of ref):
[slack] <frédéric ZINGG> -------------------------
For now, my translation into ruby loos like that:
[slack] <frédéric ZINGG> but I got error:
react_devtools_backend.js:6 undefined method `props' for GsapRunAnimation
[slack] <janbiedermann> oh, i see, that looks like a bug in :isomorfeus: then, it should accept additional args
[slack] <janbiedermann> > Accepts a function that contains imperative, possibly effectful code.
Thats what react docs say, so thats how i implemented it.
[slack] <janbiedermann> Seems like there is more to the story
[slack] <frédéric ZINGG> should be something like that ?
def use_effect(*deps, &block) ` { #{} }, deps)` end
Isomorfeus Robot
[slack] <janbiedermann> but the *deps also need to go somewhere, where?
[slack] <janbiedermann> oh, there
[slack] <janbiedermann> ok, right+

[slack] <frédéric ZINGG> ok, don't worry for now, I will play a bit in others way.

I will also clone and install the whole isomorfeus-react project, run test and everything, to be also able to update the code in the future.

Do you have an idea why I got :
react_devtools_backend.js:6 undefined method `props' for GsapRunAnimation

[slack] <janbiedermann> oh, you must use use_effect within render
Isomorfeus Robot
[slack] <janbiedermann> @frédéric ZINGG you can try i-react from master, use_effect allowing additional args
[slack] <janbiedermann> The hooks and render things and so on must all appear in or be called from one context, for :isomorfeus: thats the render block, in js its the function (= function component).
[slack] <frédéric ZINGG> ho, that was a quick update 👍
Will try, tx
[slack] <janbiedermann> no wait, wrong fix
[slack] <janbiedermann> misunderstanding
[slack] <janbiedermann> found it in the docs further down how it is supposed to be
[slack] <janbiedermann> now
Isomorfeus Robot
[slack] <frédéric ZINGG> @janbiedermann Hi,
If I want to use a local version of the isomorfeus-react repo, I declare this in my Gemfile:
gem 'isomorfeus-react', path: '/home/fcooker/rails/isomorfeus-projects/isomorfeus-react/ruby'
But how to declare allothers isomorfeus-* , one by one ?
[slack] <janbiedermann> Yes, clone the i-project repo, one by one add i-project/ruby/i-whatever.
Isomorfeus Robot
[slack] <frédéric ZINGG> in guru-isomorfeus @Tomasz Lemkowski declared that in the Gemfile:
gem 'isomorfeus-data', path: '/Users/leming/code/isomorfeus-project/ruby/isomorfeus-data' gem 'isomorfeus', '~> 1.0.0.zeta24'
Can I do that in my gemfile ? :
gem 'isomorfeus-react', path: '/home/fcooker/rails/isomorfeus-projects/isomorfeus-react/ruby' gem 'isomorfeus', '~> 1.0.0.zeta25'
or the isomorfeus-react in gem isomorfeus will be taken instead of my local version ?
[slack] <janbiedermann> nono, the gem isomorfeus just requires the ruby files. Now the order of the appearance of the gems in the gemfile determines the resolution of the ruby files. Even you have 'gem isomorfeus' in the gemfile, if you above that line, add a gem line for a specific isomorfeus gem, that one is taken, as it is resolved first.
[slack] <janbiedermann> So it does not matter where the Gem is located, but instead it is important the order of appearance in the gemfile.
Isomorfeus Robot
[slack] <frédéric ZINGG> ok, got it tx.
One thing I am not sure of, there are 2 different repos::
[slack] <janbiedermann> sure, even more. What are you not sure of?
[slack] <frédéric ZINGG> when declaring ```gem 'isomorfeus'``` it imports all others GEM packages inisomorfeus-project/ruby`:
[slack] <frédéric ZINGG> and also the one in isomorfeus-react
[slack] <janbiedermann> and i-redux
[slack] <janbiedermann> all of it
Isomorfeus Robot
[slack] <frédéric ZINGG> ok, got it, tx.
I will understand more by reading the declaraitio source code 👍
Isomorfeus Robot
[slack] <frédéric ZINGG> <@UHHUC9E58> the translation of that RACT code into :isomorfeus: almost work.:
[slack] <frédéric ZINGG> into