GitHub Explorer v1Next.js TypeScript示例项目

Next.js 的 TypeScript 整合项目挺适合前端练手的,github-explorer-v1 就是这么一个例子。结构清爽,代码也不绕,看着顺眼,用起来也顺手。用的是Next.js + TypeScript + styled-components,适合那种想搭一套前后端同构项目,又不想从零开始折腾的人。

样式化组件的组合方式也比较灵活,不用太纠结 className 拼写,写起来更直观。而且整个结构是基于 Next 的 page routing,像pages/index.tsx这种入口清晰,维护起来也简单。

部署的话也方便,照着官方的脚手架命令来一行就搞定:

npx create-next-app --example with-typescript-styled-components-app
你要是用 yarn 也有:
yarn create next-app --example with-typescript-styled-components-app
部署到云上?配合 Vercel,几分钟就上线,响应也快。

这个项目其实是两个 Next 官方示例的合体,功能上够用,逻辑也不复杂,适合当快速原型或学习模板。你要是刚入门 TypeScript,或者想摸摸 SSR 的套路,这套模板还蛮合适的。

另外推荐几篇相关文章,想拓展了解可以看看:

如果你正好在找一份结构清爽、技术组合合理的前端模板,不妨试试这个。

zip
github-explorer-v1-main.zip 预估大小:31个文件
folder
github-explorer-v1-main 文件夹
folder
public 文件夹
folder
icons 文件夹
file
github-logo.svg 3KB
file
yarn.lock 112KB
file
next-env.d.ts 75B
file
styled.d.ts 317B
folder
src 文件夹
folder
pages 文件夹
file
index.tsx 970B
file
_document.tsx 775B
file
repository.tsx 785B
file
_app.tsx 1000B
folder
services 文件夹
file
config.tsx 462B
folder
styles 文件夹
folder
pages 文件夹
file
index.tsx 1KB
file
repository.tsx 761B
file
Theme.tsx 2KB
file
global.tsx 884B
folder
components 文件夹
file
RepositoriesChilds.tsx 920B
file
Profile.tsx 1KB
file
RepositoriesParent.tsx 409B
file
RepositoriesFilter.tsx 2KB
folder
components 文件夹
file
RepositoriesChilds.tsx 755B
file
Profile.tsx 1KB
file
RepositoriesParent.tsx 1KB
file
RepositoriesFilter.tsx 780B
folder
contexts 文件夹
file
RepositoriesContext.tsx 4KB
file
UserContext.tsx 1KB
file
.babelrc 310B
file
custom.d.ts 78B
file
tsconfig.json 702B
file
.prettierrc 183B
file
README.md 1KB
file
nextconfig.js 158B
file
.gitignore 386B
file
package.json 846B
zip 文件大小:64.76KB