Sha256: 1496f6305e356245b26489829bb6959fbcc0e106fbfaacfaa20c859821359a71
Contents?: true
Size: 610 Bytes
Versions: 6
Compression:
Stored size: 610 Bytes
Contents
module Hyperloop class Router module Base def self.included(base) base.extend(HyperRouter::ClassMethods) base.include(HyperRouter::InstanceMethods) base.include(HyperRouter::ComponentMethods) base.class_eval do after_mount do @_react_router_unlisten = history.listen do |location, _action| React::State.set_state(HyperRouter, :location, location) end end before_unmount do @_react_router_unlisten.call if @_react_router_unlisten end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems