Skip to content

Instantly share code, notes, and snippets.

Qwik それはフロントエンドの見た夢

@mizchi | Workers Tech Talk


Qwik とは

  • SSR 前提 で最適化を行うUIライブラリ
    • クライアントの処理が最小限

やりたいこと(超訳)

  • d1 を prisma で動かしたい
  • prisma-query-wasm がどれだけ小さくなるか検証
    • query builder 部分だけ取り出せないか
  • PR 出せたらいいね

動機

  • (mizchi の考える)次世代の銀の弾丸
#!/usr/bin/env -S deno run --allow-net --allow-read --allow-env --unstable --ext=ts
// USAGE: $ deno run cfai-text.ts "Hello Cloudflare AI!"
type RequestType = {
messages: {
role: string;
content: string;
}[];
};
@mizchi
mizchi / フロントエンドを楽にするために.md
Last active December 14, 2023 11:57
フロントエンドを楽にするために

フロントエンドを楽にするために

Qiitaを支えたい技術 at 時雨祭

About

  • HN: mizchi
  • Qiitaの方からきました(入社半年たったらしい)
  • Reactオジサンはそろそろ飽きてきた
  • Angularに興味が無いのでこっちにきた
/**
* This is patched esm.sh/run
* - Add text/typescript-jsx
* - Add auto reload with ?poll={millisecond}
*
* Usage:
* <script type="module" src="https://gistcdn.githack.com/mizchi/897e4a83e33fdcec35fd7d17f84f79d3/raw/df31217503cad48cc9dece94269fe9779b60eba7/patched-esmsh-run.js"></script>
*/
/*! esm.sh/run
// subhosting
const API = "https://api.deno.com/v1";
type CreateDeploymentResponse = {
id: string;
projectId: string;
description: string;
status: string;
domains: string[];
databases: Record<string, any>;
@mizchi
mizchi / singlefile-frontend.md
Created November 23, 2023 10:27
How to run a minimal front-end stack in Single-File for prototyping.

Original(japanese) https://zenn.dev/mizchi/articles/standalone-html-frontend

Mostly translated by deepl


How to run a minimal front-end stack in Single-File for prototyping.

Note: Do not use in production, tailwind is running in CDN mode and esm.sh builds scripts dynamically, so performance is not good.

import React from "react";
import ReactDOM from "react-dom";
import { ChakraProvider, DarkMode, Button, LightMode } from "@chakra-ui/react";
import type { ApplicationProps } from "../../shell/src/types";
import { CacheProvider } from "@emotion/react";
import createCache from "@emotion/cache";
function Root(props: ApplicationProps) {
return (
<>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://cdn.tailwindcss.com"></script>
<style type="text/tailwindcss">
@tailwind base;
@mizchi
mizchi / backpack-battles-first-round.md
Last active October 24, 2023 13:04
Backpack Battles の1,2 ラウンドの考察

1~2 ラウンドの勝敗を分けるものはなにか。

Backpack Battles で 1~2R でスタミナが切れない想定で、ダメージ/回復/ブロックを同じ価値としてゴールドあたりの効率を計算する。 初期バッグや石は考慮しない

野菜の比較

Banana          0.26/gold
Banana(Sale) 0.40/gold