Skip to content

Instantly share code, notes, and snippets.

View ancyrweb's full-sized avatar
🏠
Working from home

Anthony Cyrille ancyrweb

🏠
Working from home
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/[email protected]/babel.min.js"></script>
<title>Hello World</title>
</head>
import { useCallback, useState } from "react";
import { StyleSheet, Text, View, ScrollView } from "react-native";
import Modal from "react-native-modal";
export default function App() {
const [visible, setVisible] = useState(false);
const showModal = useCallback(() => setVisible(true), []);
const hideModal = useCallback(() => setVisible(false), []);
return (
import { useCallback, useState } from "react";
import { StyleSheet, Text, View, Modal as RNM } from "react-native";
import Modal from "react-native-modal";
export default function App() {
const [visible, setVisible] = useState(false);
const showModal = useCallback(() => setVisible(true), []);
const hideModal = useCallback(() => setVisible(false), []);
return (
import { useCallback, useState } from "react";
import { StyleSheet, Text, View } from "react-native";
import Modal from "react-native-modal";
export default function App() {
const [visible, setVisible] = useState(false);
const showModal = useCallback(() => setVisible(true), []);
const hideModal = useCallback(() => setVisible(false), []);
return (
import { useCallback, useState } from "react";
import { StyleSheet, Text, View } from "react-native";
import Modal from "react-native-modal";
export default function App() {
const [visible, setVisible] = useState(false);
const showModal = useCallback(() => setVisible(true), []);
const hideModal = useCallback(() => setVisible(false), []);
return (
const users = [
{
id: 1,
username: "supercoder",
},
{
id: 2,
username: "xXxSniperElitexXx",
},
{
const users = [
{
id: 1,
username: "supercoder",
},
{
id: 2,
username: "xXxSniperElitexXx",
},
{
const champions = [
{
name: "Darius",
level: 7,
},
{
name: "Katarina",
level: 4,
},
{
const champions = [
{
name: "Darius",
level: 7,
},
{
name: "Katarina",
level: 12,
},
{
const elements = Array(10).fill().map((a, i) => i);
// [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]