Skip to content

Instantly share code, notes, and snippets.

View hswolff's full-sized avatar
🙃
😄

Harry Wolff hswolff

🙃
😄
View GitHub Profile
@hswolff
hswolff / App.js
Created October 26, 2018 00:56
React Hooks: A Complete Introduction Source Code. Just use create-react-app!
import React from 'react';
import UseStateDemo from './UseStateDemo';
import UseEffectDemo from './UseEffectDemo';
import './App.css';
export default () => (
<div style={{ margin: '20px auto', padding: '20px', width: 200 }}>
<UseStateDemo />
<UseEffectDemo />
</div>
@hswolff
hswolff / extensions.json
Last active July 3, 2023 01:34
Harry's Visual Studio Code Extensions, 2020
[
{
"metadata": {
"id": "d3836729-9cc1-42c1-b2af-d50071f57d29",
"publisherId": "formulahendry.auto-close-tag",
"publisherDisplayName": "formulahendry"
},
"name": "auto-close-tag",
"publisher": "formulahendry",
"version": "0.5.7"
function useLazyAnalytics() {
const [value, setValue] = useState(() => {
return () => {
const raceError = new Error('handler called before loaded');
bugsnagClient.notify(raceError);
};
});
useEffect(() => {
import('./lazyAnalytics').then((mod) => {
use std::fs::read_dir;
use std::path::PathBuf;
fn main() -> std::io::Result<()> {
println!("Hello, world!");
let root_path = PathBuf::from(".");
let coll = walk_files(root_path, None)?;