0

我想使用:

class UserDetails < HyperComponent
  param :user

  render do
    H1 { user.name }
  end

代替

class UserDetails < HyperComponent
  param :user

  render do
    H1 { @User.name }
  end

如何将其启用为默认值?

4

1 回答 1

1
class HyperComponent
  include Hyperstack::Component
  include Hyperstack::State::Observable
  param_accessor_style :accessors  # this is now the prefered param style
end
于 2019-04-06T03:23:15.927 回答