Minimal Snippets
- Few and easy to use
- Lenguages: Html Css Javascript and React
Html
| Snippet |
Codigo |
| favicon |
Favicon tag |
| html |
Basic structure of Html |
Css
| Snippet |
Codigo |
| cssreset |
margin 0; border-box |
| selection |
Change the design of text selection |
| scrollbar |
Template for scroll bardesign |
| flexcenter |
align-items: center justify-content: center |
| flexcol |
flex-direction: column |
| media |
@media(max-width:700px){ } |
| animation |
keyframe template |
| gradient |
background-image: linear-gradient(from $1, $2, $3) |
Javascript / Typescript
| Snippet |
Codigo |
| log |
console.log() |
| logcolor |
console.log(`%c `, 'color:#9ee5ff ;font-size:1.3rem') |
| warn |
console.warn() |
| mathrandom |
Math.random () |
| mathfloor |
Math.floor() |
| random |
Math.floor( Math.random ( ) * ) |
| fetch |
Generates an async function for fetch |
React
| Snippet |
Codigo |
| context |
Improved template for context and provider |
| usestate |
const [$1, set$2] = useState($3) |
| useeffect |
useEffect(( ) => {return function cleanup( ){ }}[ ]) |
| useref |
const $1 = useRef() |
| styled |
Template for styled components |
| << |
<$1 /> |
| component |
creates a function component template |
| setTimer |
ussing useEffect and set interval creates a timer |
Express
| Snippet |
Codigo |
| expressconfig |
Basic config for cors express and |
| cors |
Template for cors configuration with no dependency, add it to a middleware file cors.js |
| mongoconnect |
Create an easy connection with types |
| jwt |
json web token connection |
| |