Remix
https://gyazo.com/72bac1e6fa0d9ad27fde7630a2f2b89d
full stack framework
Web標準に基づいて構築されている
開発者
@mjackson
Ryan Florence
↑react-routerとかを作っている人たち
企業かな?
website
github
docs
Remix SPA Mode
#WIP
#??
loader()
SPA modeでは使えない
serverLoader()
SPA modeでは使えない
action()
mutation
https://azukiazusa.dev/blog/remix-spa-mode/#データのミューテーション
headers()
https://azukiazusa.dev/blog/remix-spa-mode/#headers-関数
Response headerを設定できる
routes/
entry.client.tsx
entry.server.tsx
この辺のCOmponent
code:tsx
import {
Links,
Meta,
Outlet,
Scripts,
ScrollRestoration,
} from "@remix-run/react";
build
$ npx remix build
$ npx remix-serve build/index.js
でアクセス
https://codezine.jp/article/detail/16642
Reactのfamework
Next.jsはbuild時にデータを埋め込むSSGとかをやるが、RemixはCache Controlで頑張る
というのも、扱うデータが多いのでSSGが上手くいかないから、という感じらしい
2021/10/28現在OSSではないが、OSSになるらしいみたいな話題で目にしたmrsekut.icon
Client Data API
https://remix.run/docs/en/main/guides/client-data
SSGの機能はない
分散サーバー・分散データベースをエッジで実行する
NestedRouting
react-router v6の機能?
RemixチームがShopifyに入った
https://remix.run/blog/remixing-shopify
https://shopify.engineering/remix-joins-shopify
front/backが一緒になっているものを作る場合はNext.jsより楽らしい
formのsubmitの扱いとかが楽らしい
https://remix.run/docs/en/v1/tutorials/jokes
これめっちゃ良いらしい
remix関係なくfrontend学ぶのに良いらしいmrsekut.icon
defaultでSSR
https://zenn.dev/ryoppippi/articles/8addfe62eb4d3e#暗黙のdslは...あまり良くないです-%5Bimplicit-dsls-are...-less-good%5D-(🌶🌶🌶)
Rich Harrisによる批判
server/clientのコードを同じ場所に書くことのわかりづらさ
https://remix.run/blog/seed-funding-for-remix
https://blog.remix.run/p/remix-preview
https://zenn.dev/yuyao17/articles/ee3d8adda2e61f
https://zenn.dev/steelydylan/articles/remix-nextjs-comparison
https://remix.run/blog/remix-v1
https://dev.classmethod.jp/articles/qucikstart-remix-framework/
https://zenn.dev/kaa_a_zu/articles/fbd06ca2cc3b86
https://zenn.dev/aiji42/articles/23a88a7b111694