Skip to main content

9 posts tagged with "React.js"

View All Tags

Hono and React full stack dev

Hono is an ultra-fast, lightweight, web-standard framework. Although using Hono alone for SPA development can be challenging, combining it with React enables full-stack capabilities akin to Next or Remix. Hono allows for expression not possible with React alone, such as tree structure routing. Its small bundle size and Node.js independence make it a low-cost, easily deployable option on platforms like Cloudflare. I have used Hono in some products, deploying complex features like Server-Sent Events and JWT authentication with AWS Lambda quickly.

React tutorial

onboarding ใง React tutorial ใ‚’ใ‚„ใฃใฆใฟใŸใจใใฎ memo ใงใ™ใ€‚ ไปŠๅ›žใฏใ€ tic tac toe ใฎ็›คใฎๅคงใใ•ใ‚’่‡ช็”ฑใซ้ธๆŠžใงใใ‚‹ใ‚ˆใ†ใซใ—ใฆใฟใพใ—ใŸใ€‚ codesandbox ใงใ‚ใใถใ“ใจใŒใงใใพใ™ใ€‚

promise and priority

ใชใŒใ„้…ๅปถใ‚„ใพใกใŒใฃใŸๅ„ชๅ…ˆๅบฆใŒใ‚ใ‚‹ใจใ€error ใŒ็™บ็”Ÿใ™ใ‚‹ใ“ใจใŒๅบฆใ€…ใ‚ใ‚Šใพใ™ใ€‚ ไปŠๅ›žใฏ promise ใจ priority ใงใ€ๅŒๆœŸ็š„ใ‹ใค้ †็•ชใซๅฎŸ่กŒใงใใ‚‹ใ‚ˆใ†ใซใ—ใพใ™ใ€‚ codesandbox ใฎ demo ใŒใ‚ใ‚‹ใฎใงใ€ใ‚ˆใ‚ใ—ใ‘ใ‚Œใฐใ‚ใใ‚“ใงใฟใฆใใ ใ•ใ„ใ€‚

Stateful React via event

state ็ฎก็†ใ‚’ใ™ใ‚‹ใจใใ€ReactใงใฏReduxใ‚„jotaiใชใฉใฎใƒ‘ใƒƒใ‚ฑใƒผใ‚ธใ‚’ๅˆฉ็”จใ—ใพใ™ใŒใ€ ไปŠๅ›žใฏ event listener ใฎใ‚ˆใ†ใซ state ็ฎก็†ใงใใ‚‹ใ‚ˆใ†ใชๆง‹้€ ใ‚’ใคใใฃใฆใฟใพใ—ใŸใ€‚ KeyController test - CodeSandbox ใ‹ใ‚‰ใ‚ใในใพใ™ใ€‚

r3f but not React

Computer Graphics Ninja ใซใจใฃใฆThree.jsใงใฏใคใ‚‰ใ„ใ“ใจใŒใŸใใ•ใ‚“ใ‚ใ‚Šใพใ™ใ€‚ ใพใšใฒใจใคใซใ€memoryใ‚’ๆŠ‘ใˆใ‚‹ใŸใ‚ใ€ไฝฟใ„ใŠใ‚ใฃใŸใ‚ใจใฏ .dispose() ใ™ใ‚‹ใฎใงใ€ ๅ…จใฆใฎๅค‰ๆ•ฐใ‚’ใ‚ใคใ‚ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚๏ผˆไป–ใซใ‚‚ trackใ‚’ใคใ‹ใ†ๆ–นๆณ• ใŒใ‚ใ‚Šใพใ™ใ€‚๏ผ‰ ใพใŸใ€ๆฏŽframeใฎๅ‡ฆ็†ใ‚’ไธ€ใ‹ๆ‰€ใซ้›†ใ‚ใ‚‹ ๅฟ…่ฆใŒใ‚ใ‚‹ใ“ใจใงใ™ใ€‚ ThreeController test - CodeSandbox

class based React.js hooks

Reactใง่ค‡้›‘ใชๅ‡ฆ็†ใ‚’ๅŠ ใˆใŸใจใใ€useMemo, useCallbackใ ใ‚‰ใ‘ใซใชใฃใŸใ‚Šใ€ useRef, xxxRef.currentใ ใ‚‰ใ‘ใซใชใ‚Šใ€่ชญใฟใซใใ„ใ‚ณใƒผใƒ‰ใซใชใ‚‹ใ“ใจใŒใ‚ใ‚Šใพใ™ใ€‚ ใ‚ฏใƒฉใ‚นใƒ™ใƒผใ‚นใงใ€Ctrlใ‚ฏใƒฉใ‚นใ‚’ไฝœๆˆใ—ใ€hookใ‹ใ‚‰ๆ“ไฝœใ—ใพใ™ใ€‚ ไพ‹ใจใ—ใฆใ€useDelay.tsใ‚’ๅฎš็พฉใ—ใพใ™ใ€‚ ใ“ใฎใƒ•ใƒƒใ‚ฏใฏใ€ๅฎŸ่กŒใ‚’ๅฐ‘ใ—้…ใ‚‰ใ›ใ‚‹ใ“ใจใงใ€้‡ใ„ๅ‡ฆ็†ใชใฉใŒ้‡่ค‡ใ™ใ‚‹ใฎใ‚’้˜ฒใŽใพใ™ใ€‚ useDelay test - CodeSandbox

ProjectedMaterial

Three.jsใงใ€ๆŒ‡ๅฎšใ—ใŸใ‚ซใƒกใƒฉใ‹ใ‚‰่ฆ‹ใŸๅ…‰ๆ™ฏใ‚’ใ€Textureใซใ™ใ‚‹Materialใงใ™ใ€‚ ใพใŸใ€ProjectedMaterialใงใฏใ€envMapใชใฉใ‚‚ๆŒ‡ๅฎšใงใใŸใ‚Šใ—ใพใ™ใ€‚ ไธ€ใคๆณจๆ„ใชใฎใŒใ€project()ใ‚’ไธ€ๅบฆๅฎŸ่กŒใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚