$ npm i qrcode.react
import { QRCodeSVG } from 'qrcode.react'
$ npm i qrcode.react
import { QRCodeSVG } from 'qrcode.react'
https://github.com/josdejong/mathjs
https://mathjs.org/
$ npm i mathjs
import { mean } from 'mathjs'
$ npm i react-svg
import Phaser from 'phaser' | |
import { ReactNode, useEffect, useRef, useState } from 'react' | |
import { createPortal } from 'react-dom' | |
const PHASER_CONFIG = { /* ... */ } | |
const WIDTH = 1920 / 2 | |
const HEIGHT = 1080 / 2 | |
const LEFT = (screen.width - WIDTH) / 2 | |
const TOP = (screen.height - HEIGHT) / 2 |
/** | |
* @link https://parashuto.com/rriver/development/img-size-attributes-are-back | |
*/ | |
import { Image } from '@chakra-ui/react' | |
export const myComponent = () => ( | |
// chakra image には元々 max-width: 100%; height: auto があたってる | |
<Image | |
src={'/some-large-image.png'} |
npx みたいな package 実行のための python cli ツール。
local の python 環境を汚さずに、各 package (コマンド) ごとの venv を裏手で作成して、その venv 内 script の symlink をいい感じに作成することで、あたかも pip install したかのように以降 shell で実行可能にしてくれる。
プロジェクト開発というより、手元でうにょうにょ cli で動かしたいときのやつっぽいな。
github.com/pdm-project/pdm
pdm.fming.dev
PDMによるPythonのプロジェクト管理
project.toml
など PEP 最新に準拠した python の package manager.venv
依存だが内部で package を cache するため軽量 & install 速い/** | |
* useEffect とかで deps array が [] でも | |
* react strict mode だと multiple rendering で 2 回走って困るので | |
* ref でなんとかするやつ | |
* | |
* @link https://www.sunapro.com/react18-strict-mode/ | |
* @link https://github.com/reactwg/react-18/discussions/18 | |
*/ | |
const initialized = useRef<boolean>(false) |