Skip to content

Instantly share code, notes, and snippets.

View hayanisaid's full-sized avatar
🚀
I'm Full Stack JavaScript developer and Technical writer

Said Hayani hayanisaid

🚀
I'm Full Stack JavaScript developer and Technical writer
View GitHub Profile
import React from 'react';
import {
SafeAreaView,
StyleSheet,
ScrollView,
View,
Text,
StatusBar,
} from 'react-native';
import {
import {StyleSheet, Text, View} from 'react-native'
export default function App() {
return (
<View
style={{
backgroundColor: '#a1cae2',
borderRadius: 10,
height: 200,
require("dotenv").config();
const webpack = require("webpack");
module.exports = {
webpack: (config) => {
config.plugins.push(new webpack.EnvironmentPlugin(process.env));
return config;
},
};
// 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'
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>
}
import dynamic from 'next/dynamic'
const DynamicComponent = dynamic(() => import('../components/hello'),{ssr:false})
import {useRoute} from '@react-navigation/native';
const AboutScreen = ({navigation}) => {
const route = useRoute();
return (
<View
style={{
justifyContent: 'space-around',
flex: 1,
alignItems: 'center',
}}>
const AppNavigation = ({}) => {
let auth = {
authenticated: true,
user: {
email: 'user@mail.com',
username: 'John',
},
};
let ProfileScreenTitle = auth.authenticated ? auth.user.username : 'Profile';
return (
static navigationOptions = {
title: "Sign In",
header: null,
mode: "modal",
headerMode: "none"
};
import React from 'react';
import {SafeAreaView, StyleSheet, View, Text, StatusBar} from 'react-native';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
const App: () => React$Node = () => {
return (
<>
<StatusBar barStyle="dark-content" />