// user.js
exports.name = "John";
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
export const DEMO_CONSTANT = 'I am demo' | |
export const sum = (a, b) => a + b; |
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
{ | |
"name": "Akul Srivastava", | |
"header": { | |
"title": "welcome to my page" | |
}, | |
"footer": { | |
"title": "Thanks for visiting", | |
"description": "Come back soon!" | |
} | |
} |
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
export function Greet({ name }) { | |
return <h3>Hello, {name}</h3>; | |
} |
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
declare function sum(x: number, y: number): string; |
Using Redux in ReactJS
-
Install redux and react-redux
-
Create state (src/redux/state.js)
// src/redux/state.js
export const numState = {
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
[ | |
{ | |
"text": "Genius is one percent inspiration and ninety-nine percent perspiration.", | |
"author": "Thomas Edison" | |
}, | |
{ | |
"text": "You can observe a lot just by watching.", | |
"author": "Yogi Berra" | |
}, | |
{ |
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 * as React from "react"; | |
import { | |
View, | |
Animated, | |
Image, | |
TouchableOpacity, | |
Text, | |
Dimensions, | |
StyleSheet, | |
} from "react-native"; |
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, { useState } from 'react'; | |
import { | |
View, | |
TextInput, | |
} from 'react-native'; | |
import Emoji from 'react-native-emoji'; | |
export default function App() { | |
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, { useState } from 'react'; | |
import { | |
StyleSheet, | |
Text, | |
View, | |
StatusBar, | |
Image, | |
TouchableOpacity, | |
ActivityIndicator, | |
ScrollView, |
NewerOlder