From 8114c2810ab5d64f17c93d3d88fee25274251582 Mon Sep 17 00:00:00 2001 From: Suraj Date: Thu, 16 Nov 2023 13:50:28 +0530 Subject: [PATCH 1/4] fix: as forwarder memo issue fixes --- packages/react/src/styled.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/react/src/styled.tsx b/packages/react/src/styled.tsx index 75dfc3ed..1a58c459 100644 --- a/packages/react/src/styled.tsx +++ b/packages/react/src/styled.tsx @@ -1957,9 +1957,13 @@ export function verboseStyled( componentConfig ); - const AsComp: any = React.useRef( - resolvedStyleProps.as || (passingProps.as as any) || undefined - ).current; + // const AsComp: any = React.useRef( + // resolvedStyleProps.as || (passingProps.as as any) || undefined + // ).current; + + const AsComp: any = React.useMemo(() => { + return resolvedStyleProps.as || (passingProps.as as any) || undefined; + }, [resolvedStyleProps.as]); let resolvedStyleMemo = [passingProps?.style, ...resolvedStyleProps?.style]; if (Platform.OS === 'web') { From 9814bc0aaa1586dc985740d4d4a165f2d70444b6 Mon Sep 17 00:00:00 2001 From: Suraj Date: Thu, 16 Nov 2023 13:54:09 +0530 Subject: [PATCH 2/4] v1.0.16-alpha.0 --- packages/react/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/package.json b/packages/react/package.json index c7d56163..8607d0bb 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.15", + "version": "1.0.16-alpha.0", "keywords": [ "React Native", "Next.js", From 2d59d0e290cd1397f89883e157636f44ab92ae72 Mon Sep 17 00:00:00 2001 From: Suraj Date: Thu, 16 Nov 2023 17:15:02 +0530 Subject: [PATCH 3/4] fix: provider issue with no config fixes --- packages/react/src/styled.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/react/src/styled.tsx b/packages/react/src/styled.tsx index 1a58c459..2c948fb7 100644 --- a/packages/react/src/styled.tsx +++ b/packages/react/src/styled.tsx @@ -1054,15 +1054,16 @@ export function verboseStyled( const prefixedMediaQueries: any = {}; - Object.keys(CONFIG?.tokens?.mediaQueries).forEach((key: any) => { - prefixedMediaQueries[key] = { - key: `@${key}`, - isMediaQuery: true, - }; - }); + if (CONFIG?.tokens?.mediaQueries) { + Object.keys(CONFIG?.tokens?.mediaQueries).forEach((key: any) => { + prefixedMediaQueries[key] = { + key: `@${key}`, + isMediaQuery: true, + }; + }); + } Object.assign(reservedKeys, { ...prefixedMediaQueries }); - // for extended components const EXTENDED_THEME = From 1c142df86350048fac44c55f94bcc59b0981f8ca Mon Sep 17 00:00:00 2001 From: Suraj Date: Thu, 16 Nov 2023 17:19:27 +0530 Subject: [PATCH 4/4] chore: verison updated --- packages/react/CHANGELOG.md | 7 +++++++ packages/react/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 722b7c9c..0ef9a792 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,12 @@ # @gluestack-style/react +## 1.0.16 + +### Patch Changes + +- - Conditional as prop rerender issue fixes + - Provider without config issue fixes + ## 1.0.15 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 8607d0bb..910908c9 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.16-alpha.0", + "version": "1.0.16", "keywords": [ "React Native", "Next.js",