投稿時間:2022-11-27 21:08:36 RSSフィード2022-11-27 21:00 分まとめ(11件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita 【Python】馬の競走成績情報をエクセルに出力してみた https://qiita.com/tamago_pinoko/items/f377212f441014a64e9a googlec 2022-11-27 20:22:29
js JavaScriptタグが付けられた新着投稿 - Qiita 【Vuetify】v-expansion-panelとv-switchの併用 https://qiita.com/curio_syo/items/ad99924a13e5f6d53e4a appgtltvappidinspiregtltv 2022-11-27 20:19:31
Ruby Rubyタグが付けられた新着投稿 - Qiita 【Rails】Twitterクローンを作ってみた 〜GitHubログイン(OmniAuth)〜 https://qiita.com/bloom__fu/items/380100b2ab4b2e3e69fb activerecord 2022-11-27 20:23:53
Git Gitタグが付けられた新着投稿 - Qiita Git で特定のコミットにまで戻す(→作業完了したら、最新に戻す)(git reset) https://qiita.com/ioroi/items/6af9361e2f90ea724ea0 gitreset 2022-11-27 20:35:27
Ruby Railsタグが付けられた新着投稿 - Qiita 【Rails】Twitterクローンを作ってみた 〜GitHubログイン(OmniAuth)〜 https://qiita.com/bloom__fu/items/380100b2ab4b2e3e69fb activerecord 2022-11-27 20:23:53
技術ブログ Developers.IO AWS Step Functions ステートマシンで実行されるタスクはそれぞれセッションプリンシパルが異なる https://dev.classmethod.jp/articles/aws-step-functions-statemachine-task-assumerole/ assumerole 2022-11-27 11:47:54
海外TECH DEV Community Use Preact in Next.js 13 https://dev.to/dephraiim/use-preact-in-nextjs-13-24pp Use Preact in Next js IntroductionNext js uses React by default In this blogpost I want to replace React with Preact and compare the build differences Preact is a JavaScript library considered the lightweight kb alternative of React with the same modern API and ECMA Script support Preact has the fastest Virtual DOM compared to other JavaScript frameworks It is small in size Tiny It is designed to work in a browser with DOM which justifies why it is so tiny Why Replace ReactThere are a few reasons why you would do this and there are some other posts that explain it very well The key distinction is that Preact lacks several of the experimental features included in React like Suspense and Concurrent Mode You have a strong argument for replacing React with Preact if you don t use any of these of the more sophisticated features of React I ll summarize some of the reasons you should replace React with Preact Preact provides the thinnest possible Virtual DOM abstraction on top of the DOM Preact has a small size Preact is fast and not just because of its size Preact is highly compatible with React API and supports the same ECMA ScriptPreact has a package named preact compat to let developers use React libraries with Preact Learn more about the differences of Preact from React here Get StartedLet s start by creating a new Next js app npx create next app next with preact use pnpmNext we need to install Preact in app pnpm install preact Setup app Directory in Next js Next js introduces layouts with the app directory To use the app directory add the following to your next config js file module exports reactStrictMode true swcMinify true experimental appDir true In the main directory create an app directory and a hello directory in the app directory Add a page tsx in the hello directory The app directory should look like thisapp ├ーhello│└ーpage tsx├ーhead tsx└ーlayout tsxThe head tsx and layout tsx will be generated when you start your server in dev environment Add the following to your app hello page tsxexport default function HelloPage JSX Element return lt div gt Hello from app directory lt div gt Replace the contents of pages index tsx with a simple page component export default function Home return lt div gt Index Page from pages directory lt div gt Run your app with pnpm dev and inspect http localhost and http localhost hello to confirm everything is working The SwapOnce everything is working we need to swap React with Preact in our Next js app We need to tell Next js that we d like to swap out React for Preact by using Webpack s aliasing feature only in client production build The dev server will run with React Let s update our next config js with the followingmodule exports reactStrictMode true swcMinify true experimental appDir true webpack config dev isServer gt if dev amp amp isServer Object assign config resolve alias react jsx runtime js preact compat jsx runtime react preact compat react dom test utils preact test utils react dom preact compat return config That s it Once you build your Next js application with next build you should see a decrease in bundle size Compare the build results for our demo application With PreactWith React next plugin preactThe Preact Team provides a plugin for use with Next js It works in both dev and production environments Install the pluginpnpm install next plugin preact preact react npm preact compat react dom npm preact compat react ssr prepass npm preact ssr prepass preact render to string UsageUse the plugin your next config js like this next config jsconst withPreact require next plugin preact module exports withPreact regular next js config options here If you are not using any experimental React features in your Next js app I would recommend replacing React with Preact to reduce your bundle size by a considerable chunk 2022-11-27 11:04:12
海外TECH CodeProject Latest Articles Wexflow - Open Source Workflow Engine https://www.codeproject.com/Articles/5346143/Wexflow-Open-Source-Workflow-Engine automation 2022-11-27 11:08:00
海外TECH WIRED 159 Absolute Best Cyber Monday Deals Right Now (2022) https://www.wired.com/story/best-cyber-monday-deals-2022/ robot 2022-11-27 11:03:00
ニュース BBC News - Home Gwent Police horrified by racism claims, says commissioner https://www.bbc.co.uk/news/uk-wales-63768431?at_medium=RSS&at_campaign=KARANGA sexist 2022-11-27 11:21:55
ニュース BBC News - Home World Cup: Bonnie Tyler holding out for Wales hero in Qatar https://www.bbc.co.uk/news/uk-wales-63772519?at_medium=RSS&at_campaign=KARANGA hannah 2022-11-27 11:34:43

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)