- Location - The location of the application. Usually just a URL, but the location can contain multiple pieces of information that can be used by an app
- pathname - The "file/directory" portion of the URL, like
invoices/123
- search - The stuff after
?
in a URL like/assignments?showGrades=1
. - query - A parsed version of search, usually an object but not a standard browser feature.
- hash - The
#
portion of the URL. This is not available to servers inrequest.url
so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things. - state - Object associated with a location. Think of it like a hidden URL query. It's state you want to keep with a specific location, but you don't want it to be visible in the URL.
- pathname - The "file/directory" portion of the URL, like
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
A web-based note-taking app with GitHub sync and Markdown support. (WIP) https://takenote.dev | |
https://github.com/taniarascia/takenote | |
Privacy and Security focused Segment-alternative, in Golang and React https://www.rudderlabs.com | |
https://github.com/rudderlabs/rudder-server | |
Cezerin is React and Node.js based eCommerce platform. https://cezerin.com | |
https://github.com/cezerin/cezerin |
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
// This is an example of how to fetch external data in response to updated props, | |
// If you are using an async mechanism that does not support cancellation (e.g. a Promise). | |
class ExampleComponent extends React.Component { | |
_currentId = null; | |
state = { | |
externalData: null | |
}; |
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
<staticContent lockAttributes="isDocFooterFileName"> | |
<mimeMap fileExtension=".323" mimeType="text/h323" /> | |
<mimeMap fileExtension=".aaf" mimeType="application/octet-stream" /> | |
<mimeMap fileExtension=".aca" mimeType="application/octet-stream" /> | |
<mimeMap fileExtension=".accdb" mimeType="application/msaccess" /> | |
<mimeMap fileExtension=".accde" mimeType="application/msaccess" /> | |
<mimeMap fileExtension=".accdt" mimeType="application/msaccess" /> | |
<mimeMap fileExtension=".acx" mimeType="application/internet-property-stream" /> | |
<mimeMap fileExtension=".afm" mimeType="application/octet-stream" /> | |
<mimeMap fileExtension=".ai" mimeType="application/postscript" /> |
While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.
Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
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
function timeSince(date) { | |
var seconds = Math.floor((new Date() - date) / 1000); | |
var interval = Math.floor(seconds / 31536000); | |
if (interval > 1) { | |
return interval + " years"; | |
} | |
interval = Math.floor(seconds / 2592000); |
Here I'm trying to understand what happens when I run
./hello
#include
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
#!/usr/bin/env python | |
""" | |
OSX ONLY! | |
Monitor OSX application usage from your shell | |
and at the end of the day see how much you don't | |
work ;) | |
Author: Glen Zangirolami | |
http://theglenbot.com |
NewerOlder