Skip to content
This repository has been archived by the owner on Oct 19, 2018. It is now read-only.

all_other_params is only evaluated on first mount #267

Open
catmando opened this issue Jul 13, 2018 · 0 comments
Open

all_other_params is only evaluated on first mount #267

catmando opened this issue Jul 13, 2018 · 0 comments
Labels
Milestone

Comments

@catmando
Copy link
Contributor

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 catmando added the bug label Jul 13, 2018
@catmando catmando added this to the Release 0.15 milestone Jul 13, 2018
catmando added a commit that referenced this issue Jul 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant