Sha256: 11f2b6f5a6c17159cdceb223f61512a3e01611294188563a3bfb109842226250
Contents?: true
Size: 484 Bytes
Versions: 4
Compression:
Stored size: 484 Bytes
Contents
class Route < Preact::Component render do route_match = @context[:router][:matcher].call(props[:path], @context[:location]) matches, params = props[:match] || route_match return unless matches component = props[:component] if component component = component.constantize if component.is_a?(String) Preact.create_element(component, { params: params }) else props[:children] end end end Route.context_type = RouterContext
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
isomorfeus-preact-22.9.0.rc4 | lib/route.rb |
isomorfeus-preact-22.9.0.rc3 | lib/route.rb |
isomorfeus-preact-22.9.0.rc2 | lib/route.rb |
isomorfeus-preact-22.9.0.rc1 | lib/route.rb |