npx create-expo-app@latestnpm run reset-projectrm -rf node_modulesnpm i react-native-fast-encoder web-streams-polyfill @stardazed/streams-text-encoding react-native-fetch-api- (optional)
echo "BROWSER=none # prevents browser from auto opening" >> .env
This file contains hidden or 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
| // There seems to be a few algorithms floating around for brightness/luminance detection. | |
| // One uses NTSC `(299*R + 587*G + 114*B)` which is incorrect for web colors (sRGB) see | |
| // `rgbLuminance` for "better" coefficients (seems subjective but agreed apon). To be more | |
| // accurate you need to also convert RGB from sRGB color space (which gives more spectrum to lighter colors) | |
| // to linear rgb which normalizes colors across the spectrum - better for processing. | |
| // see https://stackoverflow.com/questions/596216/formula-to-determine-perceived-brightness-of-rgb-color | |
| // convert sRGB to linear RGB values | |
| // - channel ** 2.218 same as Math.pow((channel + 0.055) / 1.055, 2.4) | |
| // - i've seen this simplified to be just `(channel / 255) ** 2.21` |
This file contains hidden or 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
| { | |
| // NORMAL SETTINGS | |
| // =============== | |
| "editor.quickSuggestions": { | |
| "comments": "on", | |
| "strings": "on", | |
| "other": "on" | |
| }, | |
| "editor.suggestOnTriggerCharacters": true, | |
| "editor.wordBasedSuggestions": true, |
- author::
- link:: rfcs/0000-first-class-support-for-promises.md at first-class-promises · acdlite/rfcs (github.com)
- extra tags:: #react #server #islands-architecture
React server components (initial proposal) was a so-so DX that solved an important problem: I want to render a React component on the server only, with APIs to easily fetch data for rendering.
- Pulls on islands architecture concepts (hi Astro.build!)
- Improves full-stack ergonomics
This file contains hidden or 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
| /* | |
| Made by Elly Loel - https://ellyloel.com/ | |
| With inspiration from: | |
| - Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/ | |
| - Andy Bell - https://piccalil.li/blog/a-modern-css-reset/ | |
| - Adam Argyle - https://unpkg.com/open-props@1.3.16/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE | |
| Notes: | |
| - `:where()` is used to lower specificity for easy overriding. | |
| */ |
Based on this blogpost.
To sign Git commits, you need a gpg key. GPG stands for GNU Privacy Guard and is the de facto implementation of the OpenPGP message format. PGP stands for ‘Pretty Good Privacy’ and is a standard to sign and encrypt messages.
Install with Homebrew:
$ brew install gpgWe are trying to combine the idea of SWR ("stale-while-revalidate") and React Suspense together, and this write-up covers all our findings from this journey.
When React Hooks launched, people started to rely on useEffect to initiate data fetching:
function User () {
This file contains hidden or 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
| pico-8 cartridge // http://www.pico-8.com | |
| version 29 | |
| __lua__ | |
| --hand cram | |
| --by @andy_makes | |
| --playable at https://andymakes.itch.io/hand-cram | |
| --********************************** | |
| --original, 557 char code |
NewerOlder