From bdf0a037a2678857ea1945a0508040f455c1ccaa Mon Sep 17 00:00:00 2001 From: ankit-tailor Date: Thu, 30 Nov 2023 16:22:27 +0530 Subject: [PATCH 1/2] fix: component refrence --- packages/react/src/styled.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/react/src/styled.tsx b/packages/react/src/styled.tsx index f83ad31e..2fcd0892 100644 --- a/packages/react/src/styled.tsx +++ b/packages/react/src/styled.tsx @@ -1979,13 +1979,14 @@ export function verboseStyled( // } const ComponentWithPlugin = React.useMemo(() => { + let MyComponent = Component; if (plugins) { for (const pluginName in plugins) { // @ts-ignore if (plugins[pluginName]?.componentMiddleWare) { // @ts-ignore - Component = plugins[pluginName]?.componentMiddleWare({ - Component: Component, + MyComponent = plugins[pluginName]?.componentMiddleWare({ + Component: MyComponent, theme, componentStyleConfig, ExtendedConfig, @@ -1996,7 +1997,7 @@ export function verboseStyled( } } } - return Component; + return MyComponent; }, []); let component; From aa362c7fd7f3430112b4832a346bbddf422e2893 Mon Sep 17 00:00:00 2001 From: ankit-tailor Date: Thu, 30 Nov 2023 16:24:42 +0530 Subject: [PATCH 2/2] v1.0.19 --- packages/react/CHANGELOG.md | 6 ++++++ packages/react/package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index b8421291..74b58d38 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,11 @@ # @gluestack-style/react +## 1.0.19 + +### Patch Changes + +- Fixed component refrence issue for plugins [PR](https://github.com/gluestack/gluestack-style/pull/547) + ## 1.0.18 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index b3558725..5c3ace6c 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "@gluestack-style/react", "description": "A universal & performant styling library for React Native, Next.js & React", - "version": "1.0.18", + "version": "1.0.19", "keywords": [ "React Native", "Next.js",