Skip to content

Instantly share code, notes, and snippets.

View mycroftcanner's full-sized avatar

Mycroft Canner mycroftcanner

  • Romanova
View GitHub Profile
@ethanhuang13
ethanhuang13 / xcode-beta-slink.sh
Last active February 3, 2023 20:21
Symbolic link from Xcode.app to Xcode-beta.app (Xcode 11.2)
@finestructure
finestructure / make-spm-playground.sh
Last active August 12, 2020 01:19
Make a playground with access to an SPM library ready for importing
#!/usr/bin/env bash
set -eux
PROJ_NAME=myproj2
PKG_URL=https://github.com/johnsundell/plot.git
PKG_FROM=0.1.0
LIB_NAME=Plot
SWIFT_VERSION=5.1.3
PLATFORM=macos
function shouldIkeepSomethingInReactState() {
if (canIcalculateItFromProps()) {
// Don't duplicate data from props in state.
// Calculate what you can in render() method.
return false;
}
if (!amUsingItInRenderMethod()) {
// Don't keep something in the state
// if you don't use it for rendering.