Skip to content

Commit

Permalink
Update yew-functional/src/use_context_hook.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Simon <simon@siku2.io>
  • Loading branch information
jstarry and siku2 committed Nov 24, 2020
1 parent 4c72967 commit 53fe13d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yew-functional/src/use_context_hook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl<T: PartialEq + 'static> Component for ContextProvider<T> {

fn changed(&mut self, ctx: &Context<Self>, new_props: &Self::Properties) -> bool {
if ctx.props.context != new_props.context {
self.notify_consumers(new_props.context.clone());
self.notify_consumers(Rc::clone(&new_props.context));
}

true
Expand Down

0 comments on commit 53fe13d

Please sign in to comment.