Skip to content

Instantly share code, notes, and snippets.

View aidenybai's full-sized avatar

Aiden Bai aidenybai

View GitHub Profile
@aidenybai
aidenybai / fps-block.js
Created December 11, 2024 12:27
"fun" way to annoy your coworkers AND get them to care about performance (block all user interaction if FPS < 50)
(() => {
const fpsDiv = document.createElement('div');
fpsDiv.style.position = 'fixed';
fpsDiv.style.bottom = '0px';
fpsDiv.style.right = '0px';
fpsDiv.style.fontSize = '12px';
fpsDiv.style.backgroundColor = 'lightgreen';
fpsDiv.style.padding = '5px';
fpsDiv.style.zIndex = '9999';
fpsDiv.style.width = '50px';
---
title: Million Lint is in public beta
date: FEB 29, 2024
description: We’d love to have your feedback
---
import { Steps, Callout, Tabs, Tab } from 'nextra-theme-docs';
import Image from 'next/image';
<div className="flex flex-col items-center gap-4">
---
title: Million Lint is in public beta
date: FEB 29, 2024
description: We’d love to have your feedback
---
import { Steps, Callout, Tabs, Tab } from 'nextra-theme-docs';
import Image from 'next/image';
<div className="flex flex-col items-center gap-4">
```
original `next.config.js`:
```js
import withBundleAnalyzer from "@next/bundle-analyzer";
// @ts-check
/**
`src/store/redux/index.js`:
```js
import { configureStore } from "@reduxjs/toolkit";
import { combineReducers } from "redux";
import userReducer from "./userReducer";
import noteMetadataReducer from "./noteMetadataReducer";
const store = configureStore({
reducer: combineReducers({
users: userReducer,
{
"/Users/aidenybai/Projects/aidenybai/anya/notes-demo/src/components/FilterInput/index.jsx": {
"components": {
"FilterInput": {
"componentName": "FilterInput",
"loc": [
3,
0,
14,
1
{
"/Users/aidenybai/Projects/aidenybai/anya/notes-demo/src/components/FilterInput/index.jsx": {
"components": {
"FilterInput": {
"componentName": "FilterInput",
"loc": [
3,
0,
14,
1
@aidenybai
aidenybai / README.md
Last active January 25, 2024 01:23
Example of Million Copilot runtime data
@aidenybai
aidenybai / newoutput.json
Last active January 24, 2024 02:17
anya-v2-output.json
{
"/Users/aidenybai/Projects/aidenybai/anya/demo/src/components/FilterInput/index.jsx": {
"source": "import { TextField } from \"@mui/material\";\n\nfunction FilterInput({ filter, onChange, noteCount }) {\n return (\n <TextField\n className=\"notes-list__input\"\n type=\"search\"\n size=\"small\"\n value={filter}\n onChange={(e) => onChange(e.target.value)}\n placeholder={`Filter ${noteCount} note${noteCount === 1 ? \"\" : \"s\"}`}\n />\n );\n}\nexport default FilterInput;\n",
"_parentLookup": {},
"components": {
"FilterInput": {
"id": "FilterInput",
"start": {
"line": 3,
"column": 0

Tags

Problem tags:

  • expensive_operation
  • unstable_reference
  • bad_selector
  • context

Solution tags: