Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Hotfix: ref issue with plugin components #556

Merged
merged 4 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @gluestack-style/react

## 1.0.22

### Patch Changes

- Hotfix: rolled back to non changing reference of styled component in component middleware.

## 1.0.21

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gluestack-style/react",
"description": "A universal & performant styling library for React Native, Next.js & React",
"version": "1.0.21",
"version": "1.0.22",
"keywords": [
"React Native",
"Next.js",
Expand Down
8 changes: 4 additions & 4 deletions packages/react/src/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1981,14 +1981,14 @@ export function verboseStyled<P, Variants, ComCon>(
// }

const ComponentWithPlugin = React.useMemo(() => {
let MyComponent = Component;
if (plugins) {
for (const pluginName in plugins) {
// @ts-ignore
if (plugins[pluginName]?.componentMiddleWare) {
// @ts-ignore
MyComponent = plugins[pluginName]?.componentMiddleWare({
Component: MyComponent,
Component = plugins[pluginName]?.componentMiddleWare({
Component: Component,

theme,
componentStyleConfig,
ExtendedConfig,
Expand All @@ -1999,7 +1999,7 @@ export function verboseStyled<P, Variants, ComCon>(
}
}
}
return MyComponent;
return Component;
}, []);

let component;
Expand Down
Loading