Sha256: 8f7a4ade55ec9a57468d392b92a74aaaaeca9301132d65c4415294924caee431

Contents?: true

Size: 946 Bytes

Versions: 71

Compression:

Stored size: 946 Bytes

Contents

module React
  module Component
    class History
      include ::Native::Wrapper

      alias_native :block, :block
      alias_native :create_href, :createHref
      alias_native :go, :go
      alias_native :go_back, :goBack
      alias_native :go_forward, :goForward
      alias_native :listen, :listen
      alias_native :push, :push
      alias_native :replace, :replace

      alias _react_component_hitory_original_method_missing method_missing

      def method_missing(prop, *args, &block)
        @native.JS[:params].JS[prop]
      end

      def location
        return @location if @location
        return nil unless @native.JS[:props].JS[:location]
        if @native.JS[:props].JS[:location].JS[:pathname]
          @location = React::Component::Location.new(@native.JS[:props].JS[:location])
        else
          @native.JS[:props].JS[:location]
        end
      end

      def to_n
        @native
      end
    end
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
isomorfeus-react-16.12.5 lib/react/component/history.rb
isomorfeus-react-16.12.4 lib/react/component/history.rb
isomorfeus-react-16.12.3 lib/react/component/history.rb
isomorfeus-react-16.12.2 lib/react/component/history.rb
isomorfeus-react-16.12.1 lib/react/component/history.rb
isomorfeus-react-16.12.0 lib/react/component/history.rb
isomorfeus-react-16.11.4 lib/react/component/history.rb
isomorfeus-react-16.11.3 lib/react/component/history.rb
isomorfeus-react-16.11.2 lib/react/component/history.rb
isomorfeus-react-16.11.1 lib/react/component/history.rb
isomorfeus-react-16.11.0 lib/react/component/history.rb
isomorfeus-react-16.10.17 lib/react/component/history.rb
isomorfeus-react-16.10.16 lib/react/component/history.rb
isomorfeus-react-16.10.14 lib/react/component/history.rb
isomorfeus-react-16.10.13 lib/react/component/history.rb
isomorfeus-react-16.10.12 lib/react/component/history.rb
isomorfeus-react-16.10.11 lib/react/component/history.rb
isomorfeus-react-16.10.10 lib/react/component/history.rb
isomorfeus-react-16.10.9 lib/react/component/history.rb
isomorfeus-react-16.10.8 lib/react/component/history.rb