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

Commit

Permalink
Merge pull request #548 from gluestack/release/@gluestack-style/react…
Browse files Browse the repository at this point in the history
…@1.0.19

Release/@gluestack style/[email protected]
  • Loading branch information
ankit-tailor authored Nov 30, 2023
2 parents e7de1f7 + aa362c7 commit ca10634
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
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.19

### Patch Changes

- Fixed component refrence issue for plugins [PR](https://github.com/gluestack/gluestack-style/pull/547)

## 1.0.18

### 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.18",
"version": "1.0.19",
"keywords": [
"React Native",
"Next.js",
Expand Down
7 changes: 4 additions & 3 deletions packages/react/src/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1979,13 +1979,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
Component = plugins[pluginName]?.componentMiddleWare({
Component: Component,
MyComponent = plugins[pluginName]?.componentMiddleWare({
Component: MyComponent,
theme,
componentStyleConfig,
ExtendedConfig,
Expand All @@ -1996,7 +1997,7 @@ export function verboseStyled<P, Variants, ComCon>(
}
}
}
return Component;
return MyComponent;
}, []);

let component;
Expand Down

0 comments on commit ca10634

Please sign in to comment.