When the exported theme is introduced into theme config, the alias and class name alias TS prompts are invalid.
Change back to the config in the package, and there will be a TS prompt.
CodeSandbox/Snack link
No response
Steps to reproduce
Initialize new project
Run as per documentation :yarn add @gluestack-ui/themed @gluestack-style/react react-native-svg@13.4.0
yarn add @gluestack-ui/config@latest
npx gluestack-ui-scripts eject-theme
Import to app.tsx
// import { config } from "@gluestack-ui/config";
import { GluestackUIProvider } from "@gluestack-ui/themed";
import React from "react";
import { RootNavigation } from "./navigation/root-navigator";
import { config } from "./theme/gluestack-ui.config";
const App = () => {
return (
<GluestackUIProvider config={config}>
<RootNavigation />
</GluestackUIProvider>
);
};
export default App;
Test:
As can be seen in the figure, the alias is invalid and the class name cannot be prompted.
Set the theme using the config in the package:
import { config } from "@gluestack-ui/config";
import { GluestackUIProvider } from "@gluestack-ui/themed";
import React from "react";
import { RootNavigation } from "./navigation/root-navigator";
// import { config } from "./theme/gluestack-ui.config"; // <--- changed here
const App = () => {
return (
<GluestackUIProvider config={config}>
<RootNavigation />
</GluestackUIProvider>
);
};
export default App;
I also tried to find solutions in other issues, although there are types of issues, but it did not solve the problem.
Description
When the exported theme is introduced into theme config, the alias and class name alias TS prompts are invalid. Change back to the config in the package, and there will be a TS prompt.
CodeSandbox/Snack link
No response
Steps to reproduce
yarn add @gluestack-ui/themed @gluestack-style/react react-native-svg@13.4.0
yarn add @gluestack-ui/config@latest
npx gluestack-ui-scripts eject-theme
Import to app.tsx
Test:
As can be seen in the figure, the alias is invalid and the class name cannot be prompted.
Set the theme using the config in the package:
I also tried to find solutions in other issues, although there are types of issues, but it did not solve the problem.
gluestack-ui Version
1.1.22
Platform
Other Platform
No response
Additional Information
No response