hyperstack-org / hyperstack-org/hyperstack

params which contain procs (callbacks) cause re-rerenders

未关闭
#329 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
JavaScript
星标
538
派生
41
PR 合并指标
30 天内没有已合并 PR

描述

```ruby

class Child
include Hyperstack::Component

param :do_something

render do
puts "child: @DoSomething.object_id"
end
end

class Parent
include Hyperstack::Component

before_mount do
@do_something = -> { puts "we did it" }
end

render do
puts "parent: @do_something.object_id"
Child(do_something: @do_something)
end
end
```

the two object_id's won't match, causing the child to be rerendered everytime the parent is rendered.

Clearly something is wrapping proc params, but not clear where this is happening.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。