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
// Basic Types | |
let id: number = 5 | |
let company: string = 'Traversy Media' | |
let isPublished: boolean = true | |
let x: any = 'Hello' | |
let ids: number[] = [1, 2, 3, 4, 5] | |
let arr: any[] = [1, true, 'Hello'] | |
// Tuple |
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
/* | |
NOTE: | |
There are 2 rules to remember about reference: | |
1. The value of the reference is persisted (remains unchanged) between component re-renderings; | |
2. Updating a reference doesn't trigger a component re-rendering. | |
2 main differences between reference and state: | |
1. Updating a reference doesn't trigger re-rendering, while updating the state makes the component re-render; | |
2. The reference update is synchronous while the state update is asynchronous. |
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
# GraphQL Cheat Sheet (with Pagination) | |
# Defining types | |
type User { | |
id: ID! | |
username: String! | |
posts: [Post!]! | |
} | |
type Post { |
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
#!/bin/bash | |
npx react-native init RnSBSixAlpha --template react-native-template-typescript; | |
cd RnSBSixAlpha; | |
yarn add @storybook/react-native@next \ | |
@react-native-async-storage/async-storage \ | |
@storybook/addon-ondevice-actions@next \ | |
@storybook/addon-ondevice-controls@next \ | |
@storybook/addon-ondevice-backgrounds@next \ | |
@storybook/addon-ondevice-notes@next \ |