Skip to content

Instantly share code, notes, and snippets.

View FixedSizeList.js
import { FixedSizeList as List } from "react-window";
const App = () => {
const [data, setData] = useState(() =>
Array.from({ length: 10000 }, faker.address.city)
);
const reverse = () => {
setData((data) => data.slice().reverse());
};
View build.json
{
"scripts": {
"clean": "rimraf outline solid package *.tgz",
"export": "figma-export use-config figma.config.js",
"test": "node test.js",
"build": "run-s clean export",
"np": "np",
"release": "run-s build np"
}
}
View migrate-components.sh
$ git status
On branch ts-setup
$ git checkout -b migrate-components # checkout from ts-setup
$ mv components/Button.jsx components/Button.tsx
$ git add . && git commit -m 'Migrate button to TS'
$ git push -u origin migrate-components
View .gitignore
firebase-debug.log*
firestore-debug.log*
ui-debug.log*
View .gitignore
// src/firebase.js
import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/firestore';
// TODO: Use a configuration object
firebaseApp.initializeApp({
projectId: '',
appId: '',