BEM - Block, Element, Modifier
1. Block
----------------------------------------------
Eg: menu
<ul class="menu"></ul>
- Elements
1. Block
----------------------------------------------
Eg: menu
<ul class="menu"></ul>
@tracked
is a decorator for Preact that makes working with state values no different than properties on your component instance.
It's one 300 byte function that creates a getter/setter alias into state/setState() for a given key, with an optional initial value. The "magic" here is simply that it works as a property decorator rather than a function, so it appears to integrate directly into the language.
tracked
has no dependencies and works with any component implementation that uses this.state
and this.setState()
.
//Usage | |
import React from 'react'; | |
import { BrowserRouter as Router } from 'react-router-dom'; | |
import Route from './AuthRoute'; | |
import Login from './Login'; | |
import Private from './Private'; | |
export default () => | |
<Router> |
100+ different js counter apps... |
Sometimes you just need to quickly take some notes.
A trick is to use the data:
scheme with data:text/html
to show just a piece of HTML in your browser.
Then using the mighty contentEditable
to make the whole thing editable.
To copy/paste into your browser address bar:
data:text/html,<html contenteditable>
By the way, I'm available for tutoring and code review :)
new Promise
?.then
callback yet?](https://gist.github.com/joepie91/4c3a10629a4263a522e3bc4839a28c83#6-but