-
Cover just one topic per section, and keep text short. Imagine each section needs to fit on a single slide: e.g. https://www.javascript.express/types
-
Multiple related topics should go on the same page: e.g. https://www.react.express/jsx
-
Prefer many small examples that each illustrate a single idea, over a single large example
-
We'll put the small examples together in "exercise" sections: https://www.javascript.express/exercises/transactions
-
Topic/overview sections don't necessarily need an example, but every other section should have an example.
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 default async function main({ inputs }) { | |
const components = Object.values(inputs.figma.components) | |
const files = {} | |
for (let component of components) { | |
files[`${component.name}.svg`] = { content: component.svgString } | |
} | |
return files; |
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 default async function main({ state, inputs }) { | |
return 42; | |
} |
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 { ethers } from "ethers"; | |
import { abi, contractAddress } from "../utils/contract"; | |
/** | |
* Fetch all token ids for an address. | |
* | |
* Tokens must be fetched one-at-a-time, due to how ERC721 contracts currently work. | |
* We return all tokens that were fetched successfully, and ignore fetching errors. | |
*/ | |
export async function fetchAllTokenIds( |
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
const { AsyncStorage } = require('react-native') | |
module.exports = AsyncStorage |
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
package com.priceexplorer | |
import android.content.Context | |
import android.graphics.* | |
import android.util.DisplayMetrics | |
import android.view.View | |
class ChartView(context: Context?) : View(context) { | |
var strokeWidth = 1f | |
var minimumValue = 0 |
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 {View, Text, StyleSheet} from 'react-native'; | |
type Props = { | |
value: number; | |
}; | |
export default function Balance({value}: Props) { | |
return ( | |
<View style={styles.container}> |
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 { FSWrapper } from '@lona/compiler/lib/helpers/fs' | |
import { Volume, createFsFromVolume } from 'memfs' | |
import { Union } from 'unionfs' | |
import fs from 'fs' | |
import path from 'path' | |
import { Volume as VolumeType } from 'memfs/lib/volume' | |
// Create a filesystem wrapper. | |
// Reading files: First try to read from the in-memory FS, falling back to the disk if a file is missing. | |
// Writing files: All files are written to the in-memory FS. We can write all files to disk later. |
NewerOlder