This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { | |
SafeAreaView, | |
StyleSheet, | |
ScrollView, | |
View, | |
Text, | |
StatusBar, | |
} from 'react-native'; | |
import { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {StyleSheet, Text, View} from 'react-native' | |
export default function App() { | |
return ( | |
<View | |
style={{ | |
backgroundColor: '#a1cae2', | |
borderRadius: 10, | |
height: 200, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("dotenv").config(); | |
const webpack = require("webpack"); | |
module.exports = { | |
webpack: (config) => { | |
config.plugins.push(new webpack.EnvironmentPlugin(process.env)); | |
return config; | |
}, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction | |
const posts = [ | |
{ | |
id: 1, | |
name: 'Nextjs is awesome' | |
}, | |
{ | |
id: 2, | |
name: 'Using TypeScript with Nextjs' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import {useRouter, Router} from 'next/router' | |
import {route} from 'next/dist/next-server/server/router' | |
export default function pid() { | |
const router = useRouter() | |
const {pid} = router.query | |
return <div>Page id :{pid}</div> | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dynamic from 'next/dynamic' | |
const DynamicComponent = dynamic(() => import('../components/hello'),{ssr:false}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {useRoute} from '@react-navigation/native'; | |
const AboutScreen = ({navigation}) => { | |
const route = useRoute(); | |
return ( | |
<View | |
style={{ | |
justifyContent: 'space-around', | |
flex: 1, | |
alignItems: 'center', | |
}}> |