- When customizing stick to the design system
- Small learning curve
- They have component-based design in mind
- Upcoming NextJS, built-in Tailwind
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Collect<T, O extends string, C extends string, S extends string, R extends any[] = []> = | |
T extends `${C}${infer Rest}` | |
? Collect<Rest, Rest, C, S, [any, ...R]> | |
: `${S}(${R['length']});${Compile<O>}`; | |
type Compile<T> = | |
T extends `+${infer Rest}` | |
? Collect<T, Rest, '+', 'c'> | |
: | |
T extends `-${infer Rest}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query IntrospectionQuery { | |
__schema { | |
queryType { | |
name | |
} | |
mutationType { | |
name | |
} | |
subscriptionType { | |
name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @license | |
* MIT License | |
* | |
* Copyright (c) 2020 Alexis Munsayac | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface SWROptions { | |
revalidateOnVisibility?: boolean; | |
revalidateOnNetwork?: boolean; | |
revalidateOnFocus?: boolean; | |
} | |
function createSWRResource<T>( | |
data: Resource<T>, | |
refetch: () => void, | |
options: SWROptions, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function serialize(source) { | |
const refs = []; | |
const assignments = []; | |
function checkRef(current) { | |
const index = refs.indexOf(current); | |
if (index === -1) { | |
refs.push(current) | |
return { first: true, index: refs.length - 1}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local random = math.random | |
local function newMap(width, height, mines) | |
local map, symbol, hide = {}, {}, {} | |
for x = 1, width do | |
map[x] = {} | |
symbol[x] = {} | |
hide[x] = {} | |
for y = 1, height do |
OlderNewer