From cb522a42639afb7b21b36406db1ee1f8ed4b0186 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Thu, 23 May 2019 14:16:04 +0200 Subject: [PATCH] withInjected -> PureComponent (fix new refs) (#1195) * withInjected -> PureComponent (fix new refs) * Consume data from context * Expand injected --- packages/ui-api/src/Injected.tsx | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/packages/ui-api/src/Injected.tsx b/packages/ui-api/src/Injected.tsx index c3eddd47ac..d924d5a4dc 100644 --- a/packages/ui-api/src/Injected.tsx +++ b/packages/ui-api/src/Injected.tsx @@ -27,18 +27,19 @@ export { }; export function withInjected

(Component: React.ComponentType

): React.ComponentType> { - return (props: Subtract) => { - return ( - - {(injected) => ( - // @ts-ignore Something here with the props are going wonky - - )} - - ); + return class extends React.PureComponent> { + render () { + return ( + + {(injected) => ( + // @ts-ignore Something here with the props are going wonky + + )} + + ); + } }; }