By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
| Working with DOM | Working with JS | Working With Functions |
|---|---|---|
| Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
| Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
| Create DOM Elements | Conditionals |
React Fiber is an ongoing reimplementation of React's core algorithm. It is the culmination of over two years of research by the React team.
| // routes.js | |
| const routes = [ | |
| { | |
| path: '/', | |
| component: Home, | |
| exact: true | |
| }, | |
| { | |
| path: '/gists', | |
| component: Gists |
Something about css-in-js libs I noticed, but no one really talks about. There exists an implicit idea of a grouped-ruleset, ie - a set of rulesets that apply either directly to an element, or are meant to be composed with other rulesets. an example with 2 libs -
// glamor
const button = css({
color: 'red',| const { introspectSchema } = require("apollo-codegen"); | |
| const { executeWithOptions } = require("graphql-code-generator/dist/cli"); | |
| const fs = require("fs"); | |
| const path = require("path"); | |
| const graphqlPath = "./src/graphql/"; | |
| const schemaInput = "./src/graphql/temp.graphql"; | |
| const jsonOutput = "./src/graphql/temp.json"; | |
| const dtsOutput = "./src/graphql/domain.d.ts"; |
just the bare necessities of state management.
Hotlink it from https://unpkg.com/valoo.
| import { useState, useEffect, useRef } from 'react'; | |
| // Usage | |
| function App() { | |
| // State and setters for ... | |
| // Search term | |
| const [searchTerm, setSearchTerm] = useState(''); | |
| // API search results | |
| const [results, setResults] = useState([]); | |
| // Searching status (whether there is pending API request) |
| // sequential | |
| function App() { | |
| let one = Resource.read('1') | |
| let two = Resource.read('2') | |
| let three = Resource.read('3') | |
| return ( | |
| <div> | |
| <div>{one}</div> | |
| <div>{two}</div> | |
| <div>{three}</div> |