module React::Component::DslInstanceMethods
Public Instance Methods
hypertrace_format_instance(h)
click to toggle source
# File lib/hyper_trace/react_trace.rb, line 21 def hypertrace_format_instance(h) filtered_vars = instance_variables - ['@native', '@props_wrapper', '@state_wrapper', '@waiting_on_resources'] h.format_instance(self, filtered_vars) do @props_wrapper.props.each do |param, value| val = h.safe_i value h.group("params.#{param}: #{val[0..10]}", collapsed: true) do puts val h.log value end end if @props_wrapper hash = Hash.new(`#{@native}.state`) updated_at = hash.delete('***_state_updated_at-***') h.group("state last updated at: #{Time.at(updated_at)}") if updated_at hash.each do |state, value| val = h.safe_i(value) h.group("state.#{state}: #{val[0..10]}", collapsed: true) do puts val h.log value end end end end