momonoki1990 / nextjs-shopify-store Goto Github PK
View Code? Open in Web Editor NEWShopify Store by Next.js
Home Page: nextjs-shopify-store.vercel.app
License: MIT License
Shopify Store by Next.js
Home Page: nextjs-shopify-store.vercel.app
License: MIT License
例えば、Header.tsx
をAtomic Designに沿ってもっと細かく分ける(/components/common/Header/CartLink.tsx
など)
コンポーネント・ファイル設計を調べた上で。
コレクションページに並び替え機能を追加したい
在庫数をあらかじめ保持しておいて、カートの中の数量がそれを上回ったら警告を出すようにする
以下の箇所など、不要な再レンダリングが発生していそうな場所があるので、メモ化することでパフォーマンスを上げたい
そもそも、useCallbackでページ全体を覆っていることから再レンダリングが常に発生していることも、パフォーマンスを検討した上で、Recoilへの移行などを検討してみたい。
商品ページで画像一覧表示にSwiperを使っているが、ページネーションのボタンが画像と重なっているので、修正する。
StoreFrontAPIを叩く際のコストの計算が確かドメイン単位だったが、getServerSideProps
で商品情報などを取得すると、同じドメインのサーバー側で叩いていることになりコスト超過しないか調査の上対応。
商品詳細ページでSwiperを使用して画像一覧を表示しているが、ページネーションのボタンが画像に重なっているので、画像を内側に寄せる。
現在ベタがきのため、ストア名をjs-buy-sdkかStoreFront APIから取得する
ProductDetails.tsx
でproduct
オブジェクトから取得しているdescriptionHtml
がProduct
typeにはないとエラーが出るので、型を拡張する(js-buy-sdkとstore front apiの仕様があっていない?)
javascript-buy-sdkを使って/collections/all
ページを作成する(デザインは簡易で、とりあえず一覧表示、可能であればページネーションできればおK)
Swatch.tsx
でrouter.replace
を実行しているが、setVariant
などと合わせて2回レンダリングが走ってしまっている。
→レンダリングを走らせずに、クエリパラメータを書き換えたい。
参考:
Silently replacing a URL #1938
vercel/next.js#1938
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.