Skip to content

Instantly share code, notes, and snippets.

View arinthros's full-sized avatar

Bryson Hotopp arinthros

View GitHub Profile
@arinthros
arinthros / README.md
Last active August 24, 2023 16:05
Yarn Patch for Util Package
  1. Put the patch in .yarn/patches folder.
  2. Add the patch in resolutions of package.json.
  3. Make sure both files are committed to the repo.
@arinthros
arinthros / nested-routes.jsx
Created November 23, 2021 02:23
React Router v6 nesting example
import { Route, Routes } from 'react-router-dom'
function AppRoutes() {
return (
<Routes>
<Route index={true} element={<Home />} />
<Route path="settings" element={<Settings />}>
<Route path="people" element={<PeopleSettings />}>
<Route path=":userId" element={<PersonSettings />} />
</Route>
@arinthros
arinthros / data-fetching-demo.js
Created September 7, 2021 20:35
React router data fetching demo
import React from 'react'
import { useRouteMatch } from 'react-router-dom'
import { statusTypes } from '@youversion/react' // Helper object for status enums 'pending', 'idle', 'resolved', 'rejected'
import { getThing } from './api-methods'
function MyComponent() {
const { path } = useRouteMatch()
const [loadingStatus, setLoadingStatus] = React.useState(statusTypes.PENDING)
const [data, setData] = React.useState()
@arinthros
arinthros / generate-docs-from-js
Created September 29, 2020 20:38
Generate Docusaurus Docs from JSDoc
/**
* Requires jsdoc and jsdoc-to-markdown
*/
/* eslint-disable no-console */
const fs = require('fs')
const path = require('path')
const glob = require('glob')
const { execSync } = require('child_process')
const jsdoc2md = require('jsdoc-to-markdown')
@arinthros
arinthros / extensions.json
Created July 9, 2020 12:58
VSCode extensions
[
{
"metadata": {
"id": "d3836729-9cc1-42c1-b2af-d50071f57d29",
"publisherId": "formulahendry.auto-close-tag",
"publisherDisplayName": "formulahendry"
},
"name": "auto-close-tag",
"publisher": "formulahendry",
"version": "0.5.8"
@arinthros
arinthros / settings.json
Created July 9, 2020 12:56
VSCode settings
{
"terminal.integrated.rendererType": "dom",
"emmet.includeLanguages": {
"erb": "html",
"ruby": "html",
"html.erb": "html",
"javascript": "javascriptreact",
"marko": "html"
},
"emmet.triggerExpansionOnTab": true,
@arinthros
arinthros / react-snippets.code-snippets
Last active July 9, 2020 12:56
Custom React snippets for VSCode
// Place in the snippets folder of vscode
{
// shortcode: impc
// Creates an empty React function component with a common set of items, like imports and proptypes
// Tab stop 1 is the function name
// Tab stop 2 is for props
"Create empty component": {
"scope": "javascript",

Keybase proof

I hereby claim:

  • I am arinthros on github.
  • I am arinthros (https://keybase.io/arinthros) on keybase.
  • I have a public key ASBxUxy-3sWKiamVTQ_DOckQBIosKxX9xdR-Yy5cOOWQoAo

To claim this, I am signing this object: