Skip to content

Instantly share code, notes, and snippets.


Mark Erikson markerikson

View GitHub Profile
markerikson /
Last active March 18, 2023 17:23
RTK ESM/TS Config meeting notes - 2023-02-27/28

RTK ESM/TS Discussion


  • Nathan Bierema
  • Mateusz Burzynski
  • Mark Erikson


  • Mateusz: what do you want besides "ship widely compat code?" What preferences?
markerikson /
Last active February 16, 2023 20:47
React Data Fetching Library Summit notes - 2023-02-16

React Data Fetching Library Summit - 2023-02-16


  • Lenz Weber-Tronic
  • Dominik Dorfmeister
  • Fredrik Hoglund
  • Jerel Miller
  • Alessia Bellisario
  • Andrew Clark
markerikson /
Last active January 10, 2023 14:39
Assorted questions to ask companies in interviews



  • company location / remote?
  • what project management method?
  • good and bad company culture?
  • performance reviews?
  • what's the path to profitability?
markerikson / next.config.js
Created November 2, 2021 20:12
Work app Next.js config
View next.config.js
// omit imports and stuff
// Using Next 11.1
module.exports = withPlugins(
enabled: process.env.ANALYZE === 'true'
markerikson / AppErrorFallback.tsx
Created July 1, 2021 13:43
Next.js ErrorBoundary example
View AppErrorFallback.tsx
import React from 'react';
import Jumbotron from 'react-bootstrap/Jumbotron';
import Alert from 'react-bootstrap/Alert';
import Button from 'react-bootstrap/Button';
import { FallbackProps } from 'react-error-boundary';
interface AEFProps extends FallbackProps {
markerikson / chatsSlice.ts
Last active March 9, 2023 12:23
Nested `createEntityAdapter` example
View chatsSlice.ts
// Example of using multiple / nested `createEntityAdapter` calls within a single Redux Toolkit slice
interface Message {
id: string;
roomId: string;
text: string;
timestamp: string;
username: string;
markerikson /
Last active February 22, 2021 13:00
Stuff I googled while updating React-Redux to run tests against React Native
  • Double-checking whether window exists in React Native:
react native window global
  • Finding the giant "useLayoutEffect warnings" thread:
react uselayouteffect ssr
markerikson /
Created September 14, 2019 00:31
Reactiflux chat log: How does React store hooks on Fibers?

[12:14 AM] acreddy : are hooks value stored in fiber?

[10:40 AM] ghardin137 : not really

[10:50 AM] acemarke : @acreddy, @ghardin137 : yes they are, actually.

A "fiber" is a plain JS object that React uses to store bookkeeping information on each rendered component in the tree. The linked list of hooks is indeed stored as a field on the fiber for that component

markerikson / discord-split-theme-userscript.js
Last active September 10, 2019 03:19
Discord: Split Theme Userscript (Dark Sidebar, Light Chat)
View discord-split-theme-userscript.js
// ==UserScript==
// @name Discord Split Dark+Light Theme
// @version 1
// @match*
// @grant none
// ==/UserScript==
// NOTE: Set Discord to the Light theme. This will override the sidebar and
// "guilds" sections to force them to the dark theme.
markerikson /
Created August 28, 2019 23:12
Python script to download missing files in a Yarn offline mirror
# coding=utf-8
import sys
import re
import requests
if(sys.version_info.major < 3):
print("This script must be run with Python 3.6 or higher!")
import pathlib