@@ -116,7 +116,7 @@ def component_will_receive_props(next_props)
116
116
# useful within the react.rb environment for now we are just using it to
117
117
# clear processed_params
118
118
State . set_state_context_to ( self ) do
119
- self . run_callback ( :before_receive_props , Hash . new ( next_props ) )
119
+ self . run_callback ( :before_receive_props , next_props )
120
120
end
121
121
rescue Exception => e
122
122
self . class . process_exception ( e , self )
@@ -129,9 +129,8 @@ def props_changed?(next_props)
129
129
130
130
def should_component_update? ( next_props , next_state )
131
131
State . set_state_context_to ( self ) do
132
- next_props = Hash . new ( next_props )
133
132
if self . respond_to? ( :needs_update? )
134
- !!self . needs_update? ( next_props , Hash . new ( next_state ) )
133
+ !!self . needs_update? ( next_props , next_state )
135
134
elsif false # switch to true to force updates per standard react
136
135
true
137
136
elsif props_changed? next_props
@@ -150,15 +149,15 @@ def should_component_update?(next_props, next_state)
150
149
151
150
def component_will_update ( next_props , next_state )
152
151
State . set_state_context_to ( self ) do
153
- self . run_callback ( :before_update , Hash . new ( next_props ) , Hash . new ( next_state ) )
152
+ self . run_callback ( :before_update , next_props , next_state )
154
153
end
155
154
rescue Exception => e
156
155
self . class . process_exception ( e , self )
157
156
end
158
157
159
158
def component_did_update ( prev_props , prev_state )
160
159
State . set_state_context_to ( self ) do
161
- self . run_callback ( :after_update , Hash . new ( prev_props ) , Hash . new ( prev_state ) )
160
+ self . run_callback ( :after_update , prev_props , prev_state )
162
161
State . update_states_to_observe
163
162
end
164
163
rescue Exception => e
0 commit comments