hyper-react icon indicating copy to clipboard operation
hyper-react copied to clipboard

all_other_params is only evaluated on first mount

Open catmando opened this issue 7 years ago • 0 comments

class Foo < Hyperloop::Component
  collect_all_other_params_as :opts
  ...
end
...
class Test < Hyperloop::Component
  after_mount do 
    every(1) { force_update! }
  end
  render do
    Foo(time: Time.now)
  end
end

The value of params.opts[:time] will never change.

The problem is that the collected props are kept in an instance variable that needs to be reset when new props arrive.

catmando avatar Jul 13 '18 18:07 catmando