Skip to content

Commit

Permalink
Merge pull request #142 from kobaltedev/develop
Browse files Browse the repository at this point in the history
chore: changeset v0.7.4
  • Loading branch information
fabien-ml authored Mar 18, 2023
2 parents 836dac4 + 502237a commit ecad28b
Show file tree
Hide file tree
Showing 11 changed files with 982 additions and 1,920 deletions.
5 changes: 5 additions & 0 deletions .changeset/sharp-ravens-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@kobalte/core": patch
---

Unnecessary re-renders when using polymorphic `<As>` component.
10 changes: 5 additions & 5 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"dependencies": {
"@kobalte/core": "0.7.3",
"@solidjs/meta": "0.28.2",
"@solidjs/router": "0.7.0",
"@solidjs/router": "0.7.1",
"@tanstack/solid-virtual": "3.0.0-beta.6",
"clsx": "1.2.1"
},
Expand All @@ -43,8 +43,8 @@
"@mdx-js/rollup": "2.3.0",
"@tailwindcss/typography": "0.5.9",
"acorn": "8.8.2",
"autoprefixer": "10.4.13",
"babel-preset-solid": "1.6.12",
"autoprefixer": "10.4.14",
"babel-preset-solid": "1.6.13",
"encoding": "0.1.13",
"github-slugger": "1.5.0",
"iconv-lite": "0.6.3",
Expand All @@ -58,14 +58,14 @@
"remark-shiki-twoslash": "3.1.1",
"safer-buffer": "2.1.2",
"shiki": "0.14.1",
"solid-js": "1.6.12",
"solid-js": "1.6.15",
"solid-mdx": "0.0.6",
"solid-start": "0.2.23",
"solid-start-netlify": "0.2.23",
"solid-start-node": "0.2.23",
"tailwindcss": "3.2.7",
"typescript": "4.9.5",
"undici": "5.20.0",
"undici": "5.21.0",
"unist-util-visit": "4.1.2",
"vite": "3.2.5"
},
Expand Down
1 change: 1 addition & 0 deletions apps/docs/src/VERSIONS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const CORE_VERSIONS = [
"0.7.1",
"0.7.2",
"0.7.3",
"0.7.4",
].reverse();

export const LATEST_CORE_CHANGELOG_URL = `/docs/changelog/${CORE_VERSIONS[0].replaceAll(".", "-")}`;
Expand Down
7 changes: 7 additions & 0 deletions apps/docs/src/routes/docs/changelog/0-7-4.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# v0.7.4

**March 18, 2023**.

## Bug fixes

- Unnecessary re-renders when using polymorphic `<As>` component.
2 changes: 1 addition & 1 deletion apps/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"dependencies": {
"@kobalte/core": "^0.7.3",
"@kobalte/utils": "^0.6.1",
"solid-js": "1.6.12"
"solid-js": "1.6.15"
},
"devDependencies": {
"@kobalte/tailwindcss": "^0.5.0",
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
},
"devDependencies": {
"@babel/core": "7.20.12",
"@babel/core": "7.21.3",
"@babel/preset-env": "7.20.2",
"@changesets/cli": "2.26.0",
"@commitlint/cli": "17.4.2",
Expand All @@ -60,9 +60,9 @@
"@types/testing-library__jest-dom": "5.14.5",
"@typescript-eslint/eslint-plugin": "5.51.0",
"@typescript-eslint/parser": "5.51.0",
"babel-preset-solid": "1.6.12",
"babel-preset-solid": "1.6.13",
"commitizen": "4.3.0",
"eslint": "8.33.0",
"eslint": "8.36.0",
"eslint-config-prettier": "8.6.0",
"eslint-import-resolver-typescript": "2.7.1",
"eslint-plugin-import": "2.27.5",
Expand All @@ -77,7 +77,7 @@
"lint-staged": "13.1.1",
"prettier": "2.8.4",
"prettier-plugin-tailwindcss": "0.2.2",
"solid-js": "1.6.12",
"solid-js": "1.6.15",
"solid-testing-library": "0.3.0",
"sort-package-json": "2.4.1",
"ts-jest": "28.0.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@kobalte/tests": "^0.3.1"
},
"peerDependencies": {
"solid-js": "^1.6.12"
"solid-js": "^1.6.15"
},
"publishConfig": {
"access": "public"
Expand Down
7 changes: 5 additions & 2 deletions packages/core/src/polymorphic/polymorphic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export function Polymorphic<T extends ValidComponent>(props: PolymorphicProps<T>

// Single child is `As`.
if (isAs(resolvedChildren())) {
return <Dynamic {...combineProps(others, resolvedChildren()?.props ?? {})} />;
const combinedProps = combineProps(others, resolvedChildren()?.props ?? {});
return <Dynamic {...combinedProps} />;
}

// Multiple children, find an `As` if any.
Expand All @@ -82,7 +83,9 @@ export function Polymorphic<T extends ValidComponent>(props: PolymorphicProps<T>
</For>
);

return <Dynamic {...combineProps(others, newElement?.props ?? {})}>{newChildren}</Dynamic>;
const combinedProps = combineProps(others, newElement?.props ?? {});

return <Dynamic {...combinedProps}>{newChildren}</Dynamic>;
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@types/jest-axe": "3.5.4"
},
"peerDependencies": {
"solid-js": "^1.6.12",
"solid-js": "^1.6.15",
"solid-testing-library": "^0.3.0"
}
}
8 changes: 4 additions & 4 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
"dependencies": {
"@solid-primitives/event-listener": "^2.2.8",
"@solid-primitives/keyed": "^1.1.8",
"@solid-primitives/media": "^2.1.3",
"@solid-primitives/props": "^3.1.1",
"@solid-primitives/media": "^2.1.4",
"@solid-primitives/props": "^3.1.2",
"@solid-primitives/refs": "^1.0.0",
"@solid-primitives/utils": "^5.4.0"
"@solid-primitives/utils": "^5.5.0"
},
"peerDependencies": {
"solid-js": "^1.6.12"
"solid-js": "^1.6.15"
},
"publishConfig": {
"access": "public"
Expand Down
Loading

0 comments on commit ecad28b

Please sign in to comment.