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] <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):
[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) `Opal.global.React.useEffect(function() { #{block.call} }, deps)` end
Isomorfeus Robot
@isomorfeusbot
[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
@isomorfeusbot
[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
@isomorfeusbot
[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 ?
tx
[slack] <janbiedermann> Yes, clone the i-project repo, one by one add i-project/ruby/i-whatever.
Isomorfeus Robot
@isomorfeusbot
[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
@isomorfeusbot
[slack] <frédéric ZINGG> ok, got it tx.
One thing I am not sure of, there are 2 different repos:: https://files.slack.com/files-pri/THYSYJT0F-F011BQXTH9D/download/image.png
[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`: https://files.slack.com/files-pri/THYSYJT0F-F011X8YTGKS/download/image.png
[slack] <frédéric ZINGG> and also the one in isomorfeus-react
[slack] <janbiedermann> and i-redux
[slack] <janbiedermann> all of it
Isomorfeus Robot
@isomorfeusbot
[slack] <frédéric ZINGG> ok, got it, tx.
I will understand more by reading the declaraitio source code 👍
Isomorfeus Robot
@isomorfeusbot
[slack] <frédéric ZINGG> <@UHHUC9E58> the translation of that RACT code into :isomorfeus: almost work.: https://files.slack.com/files-pri/THYSYJT0F-F011DSJ1ULB/download/image.png
[slack] <frédéric ZINGG> into