Fix import issue, now hook issue shows

This commit is contained in:
2024-05-16 11:54:10 +02:00
parent f5521d8c86
commit fdf646155e
2 changed files with 9 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
import { useState } from 'react';
import reactLogo from './assets/react.svg';
import { Text } from 'react-native';
import { View } from 'react-native';
import './App.css';
function App() {
@@ -17,14 +17,14 @@ function App() {
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<View className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Edit <code>src/App.jsx</code> and save to test HMR
</p>
</div>
</View>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>

View File

@@ -9,10 +9,12 @@ export default defineConfig({
react(),
reactNative(),
cjsInterop({
dependencies: [
"inline-style-prefixer",
"inline-style-prefixer/**",
],
dependencies: ["inline-style-prefixer", "inline-style-prefixer/**"],
}),
],
ssr: {
optimizeDeps: {
include: ["react-native-web"],
},
},
});