投稿時間:2023-06-10 10:08:05 RSSフィード2023-06-10 10:00 分まとめ(11件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
js JavaScriptタグが付けられた新着投稿 - Qiita 【React】useStateについて https://qiita.com/hukuryo/items/1035fe73ff22a85b86de codesandebox 2023-06-10 09:41:53
AWS AWSタグが付けられた新着投稿 - Qiita AWSの主要サービスの簡単な説明「AWS 初心者向けオンラインイベント~踏み出そう、AWS への最初の一歩~」を視聴して https://qiita.com/hirohokke/items/da7134307705562894ca 視聴 2023-06-10 09:43:07
技術ブログ Developers.IO [アップデート]AWS Configで特定のリソースタイプだけを記録から除外できるようになりました! https://dev.classmethod.jp/articles/aws-config-supports-recording-exclusions-by-resource-type/ awsconfig 2023-06-10 00:06:41
海外TECH DEV Community Easy React Infinite Scroll👌 https://dev.to/apestein/easy-react-infinite-scroll-367h Easy React Infinite Scroll IntroductionI had a hard time implementing a react infinite scroll feature so I decided to make an npm package to make it super simple If you have ever tried to implement a react infinite scroll feature you might have seen react infinite scroll component and react finite scroller The problem with these packages are They are large which makes them hard to customize Written as class component also hard to customize Uses the event listener on the scroll event which is not performant Mine uses the modern intersection observer API Better React Infinite ScrollNPMDemoSource Code Install or just copy and paste import React useEffect useRef from react interface InfiniteScrollProps extends React ComponentPropsWithRef lt div gt fetchNextPage gt any hasNextPage boolean loadingMessage React ReactNode endingMessage React ReactNode export default function InfiniteScroller props InfiniteScrollProps const fetchNextPage hasNextPage loadingMessage endingMessage children rest props const observerTarget useRef null useEffect gt const observer new IntersectionObserver entries gt if entries isIntersecting void fetchNextPage threshold if observerTarget current observer observe observerTarget current return gt if observerTarget current observer unobserve observerTarget current observerTarget return lt div rest style overflowAnchor none gt children lt div ref observerTarget gt lt div gt hasNextPage amp amp loadingMessage hasNextPage amp amp endingMessage lt div gt How to use normal scrollimport InfiniteScroller from better react infinite scroll return lt InfiniteScroller fetchNextPage fetchNextPage hasNextPage hasNextPage loadingMessage lt p gt Loading lt p gt endingMessage lt p gt The beginning of time lt p gt gt elements map el gt lt div key el id gt el lt div gt lt InfiniteScroller gt How to use inverse scrollFor inverse scroll use flex direction column reverse Scoller height must be defined Here we use tailwind flex flex but height px would also work for example import InfiniteScroller from better react infinite scroll return lt div className flex h screen flex col gt lt InfiniteScroller fetchNextPage fetchNextPage hasNextPage hasNextPage loadingMessage lt p gt Loading lt p gt endingMessage lt p gt The beginning of time lt p gt className flex flex flex col reverse overflow auto gt elements map el gt lt div key el id gt el lt div gt lt InfiniteScroller gt lt div gt Full example with tRPC and React Query TanStack Query import InfiniteScroller from better react infinite scroll if using with tRPCconst data fetchNextPage hasNextPage api main getAll useInfiniteQuery limit getNextPageParam lastPage gt lastPage nextCursor if using with React Query TanStack const data fetchNextPage hasNextPage useInfiniteQuery queryKey projects queryFn fetchProjects getNextPageParam lastPage pages gt lastPage nextCursor function aggregatePosts const pages data pages const posts pages reduce prev current gt const combinedPosts prev posts concat current posts const shallowCopy prev shallowCopy posts combinedPosts return shallowCopy posts return posts return lt gt lt InfiniteScroller fetchNextPage fetchNextPage hasNextPage hasNextPage loadingMessage lt p gt Loading lt p gt endingMessage lt p gt The beginning of time lt p gt gt aggregatePosts map post gt lt li key post id gt post content lt li gt lt InfiniteScroller gt lt gt tRPC docsReact Query docs If you find this useful please star this repo on Github Also follow me on Twitter for tech advise and hot takes 2023-06-10 00:01:13
海外ニュース Japan Times latest articles Trump risked national secrets, U.S. prosecutors allege in indictment https://www.japantimes.co.jp/news/2023/06/10/world/politics-diplomacy-world/trump-indictment-unsealed-37-counts/ Trump risked national secrets U S prosecutors allege in indictmentU S prosecutors unsealed a count indictment accusing the ex president of risking some of the country s most sensitive security secrets after leaving the White House 2023-06-10 09:17:08
海外ニュース Japan Times latest articles Decrying ‘witch hunt,’ Boris Johnson resigns from U.K. parliament https://www.japantimes.co.jp/news/2023/06/10/world/politics-diplomacy-world/britain-boris-johnson-quits-parliament/ Decrying witch hunt Boris Johnson resigns from U K parliamentJohnson had been under investigation by a parliamentary inquiry looking into whether he misled the House of Commons about COVID lockdown breaking parties 2023-06-10 09:08:26
ニュース BBC News - Home Chris Mason: The ghost of Boris Johnson haunts Rishi Sunak https://www.bbc.co.uk/news/uk-politics-65864011?at_medium=RSS&at_campaign=KARANGA attention 2023-06-10 00:17:27
ニュース BBC News - Home US couple struggle to bank huge haul of pennies https://www.bbc.co.uk/news/world-us-canada-65839799?at_medium=RSS&at_campaign=KARANGA angeles 2023-06-10 00:06:57
ビジネス 東洋経済オンライン 8年で住宅ローン完済、4700万貯めた「超節約術」 専業主婦の妻と子の3人家族「豊かな節約生活」 | 「となりの倹者たち」人生を好転させた節約の流儀 | 東洋経済オンライン https://toyokeizai.net/articles/-/677731?utm_source=rss&utm_medium=http&utm_campaign=link_back 住宅ローン 2023-06-10 10:00:00
ビジネス 東洋経済オンライン 逆転の発想で大ヒットした「ホンダ」4台の救世主 クリエイティブ・ムーバーに宿るホンダらしさ | 1990年代のクルマはこんなにも熱かった | 東洋経済オンライン https://toyokeizai.net/articles/-/676483?utm_source=rss&utm_medium=http&utm_campaign=link_back 東洋経済オンライン 2023-06-10 09:30:00
ビジネス 東洋経済オンライン 【子どもの近視】今すぐできる進行予防行動2つ 裸眼視力0.3未満の小学生は30年前の3倍以上 | 「病気」と「症状」の対処法 | 東洋経済オンライン https://toyokeizai.net/articles/-/677768?utm_source=rss&utm_medium=http&utm_campaign=link_back 日本眼科学会 2023-06-10 09:10:00

コメント

このブログの人気の投稿

投稿時間: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件)