- Sharing what has worked for me in different React Native projects
- Reusing screens in different parts of your app
- Easy to work separately in a feature
- Add an extra level (nested folder) only when necessary
- Don't overuse
index.jsfor everything
| import { exec } from "https://deno.land/x/exec/mod.ts"; | |
| const watcher = Deno.watchFs("./"); | |
| for await (const event of watcher) { | |
| // if you're curious | |
| // let kind = event.kind | |
| // console.log('EVENT KIND: ', kind) | |
| await exec('clear') | |
| await exec('deno test --allow-read') | |
| } |
| #!/bin/bash | |
| # | |
| # Fixes error: | |
| # git: 'secrets' is not a git command. See 'git --help'. | |
| # | |
| # 1. Go to SourceTree preferences > Git > Use System Git | |
| # Select the system's git e.g. /usr/local/git/bin/git | |
| # 2. Run this script | |
| # Adust the path if your system's git is located in a different folder | |
| # git-secrets must be linked in the same folder as the system's git binary |
| // install | |
| // npm i gulp-cache gulp-imagemin imagemin-pngquant imagemin-zopfli imagemin-mozjpeg imagemin-giflossy -f | |
| // node node_modules/jpegtran-bin/lib/install.js | |
| // node node_modules/gifsicle/lib/install.js | |
| // node node_modules/zopflipng-bin/lib/install.js | |
| // node node_modules/mozjpeg/lib/install.js | |
| // node node_modules/giflossy/lib/install.js | |
| // node node_modules/pngquant-bin/lib/install.js |
| # Install Homebrew | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| # Install nvm | |
| brew install nvm | |
| # Export nvm environment | |
| export NVM_DIR="$HOME/.nvm" | |
| . "$(brew --prefix nvm)/nvm.sh" |
| const arr1 = [1,2,3] | |
| const arr2 = [4,5,6] | |
| const arr3 = [...arr1, ...arr2] //arr3 ==> [1,2,3,4,5,6] |
| var a = ["sdfdf", "http://oooooolol"], | |
| handleNetErr = function(e) { return e }; | |
| Promise.all(fetch('sdfdsf').catch(handleNetErr), fetch('http://invalidurl').catch(handleNetErr)) | |
| .then(function(sdf, invalid) { | |
| console.log(sdf, invalid) // [Response, TypeError] | |
| }) | |
| .catch(function(err) { | |
| console.log(err); | |
| }) |
Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets
“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”
You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?