Sha256: d4af4e645b40150567b6381a930f85e1de3835a63e1387d9c4d1095db3bcfdb5
Contents?: true
Size: 419 Bytes
Versions: 5
Compression:
Stored size: 419 Bytes
Contents
module Ovto class PureComponent < Component class StateIsNotAvailable < StandardError; end def initialize(*args) super @prev_props = nil @cache = nil end def do_render(args, state) return @cache if args == @prev_props @prev_props = args @cache = super end def state raise StateIsNotAvailable, "Cannot use state in PureComponent" end end end
Version data entries
5 entries across 5 versions & 1 rubygems