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

Release/@gluestack style/[email protected] #548

Merged
merged 5 commits into from
Nov 30, 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.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