Closed caolong0204 closed 2 years ago
Hi @caolong0204 thank you for using our lib! May I ask you about screenshots of code where you using our library, with imports?! It will give us possibility to resolve your issue so fast as we can!
Hey @caolong0204, I have tested it in a new app made with expo init
and found no issues.
We could really use more info on how your project is setup (ideally, an expo snack, but i think steps-to-reproduce would also work).
Here's how i did it:
// components/MyPage.jsx
import Timetable from "react-native-calendar-timetable";
function MyPage() {
return <Timetable date={new Date()}/>;
}
export default MyPage;
// App.js
import {View} from "react-native";
import MyPage from "./components/MyPage";
export default function App() {
return (
<View>
<MyPage/>
</View>
);
}
Hi , when i installed the library , i found this error. The problem is that : metro can't resolve the jsx file in default config. to fix this you have to add in metro.config.js this lines
`module.exports = { resolver: {
sourceExts: ['jsx','js','ts','tsx'] },` after this I cleaned the cache and the app worked.
We will prepare fix for this shortly.
i don't know why, but i always get this error when building app after install lib. error: Error: Unable to resolve module ./src/Timetable from /Users/.../node_modules/react-native-calendar-timetable/index.js:
How to implement your lib?