已写下 85 篇博客文章,共计 101,765 字,完整阅读预计需要 8.5 小时,已有 1,179,008 次阅读。
按照【分类】筛选文章
按照【标签】筛选文章

Next.js (React) 实用进阶技巧
自用整理的 Next.js 或 React 项目进阶小技巧。

Next.js 13 appDir 实战 i18n
# 背景 官方目前未打算支持 i18n 国际化路由支持,且尚未提供解决方案,但是我们可以通过实验特性 appDir 来实现。 > ## Not Planned Features > > We are currently not planning to include the following features in app: > > - Internationalization (i18n) - we will be providing a guide on how to implement internationalization in app. > - AMP Support > > If you need any of these features, we will continue to support `pages`, including bug fixes and feature additions, for multiple major versions. 文档地址: https://beta.nextjs.org/docs/app-directory-roadmap#not-planned-features 首先需要了解一下 `Server and Client Components` 服务器组件和客户端组件。 | What do you need to do? | Server Component | Client Component | | :

今年的情人节,给心爱的她一个不一样的礼物吧
今天是 2022 年 2 月 2 日,距离今年的情人节只有不到两周的时间了。 给大家隆重介绍一个网站,[憨憨.我爱你](https://xn--wkua.xn--6qq986b3xl/) 参考示例网站: - [表白幻灯片.憨憨.我爱你](https://xn--owtp31bqkbezhj50a.xn--wkua.xn--6qq986b3xl/) - [源码](https://github.com/willin-love/romantic_page) - [恋爱计时器.憨憨.我爱你](https://xn--m7rx3unue2vok44a.xn--wkua.xn--6qq986b3xl/) - [源码](https://github.com/willin-love/romantic_page) # 申请流程 打开官网首页: [憨憨.我爱你](https://xn--wkua.xn--6qq986b3xl/) (由于该网站数据库使用的是 PlanetScale 免费服务,位于美东,所以访问可能会稍微有点慢。请耐心等待。)  使用 [Authing](https://www.authing.cn/?utm_source=v0&utm_campaign=hanhan) 账号登录(可以手机、邮箱注册,Github 账号登录,或者微信小程序扫码,后续还会添加更多登录方式)。  可以分别点击进入域名申请和邮箱申请。 ## 域名申请 域名申请界面如下:  支持的绑定方式有三种: - CNAME: 可以使用 Github Pages、 Netlify、 Gitee、 Coding.net、 Cloudflare 等提供托管服务的平台 - 值参考: `willin.github.io` - 注意: 不支持 Vercel ,因为 Vercel 默认情况下并不支持绑定二级域名(除非所有权在你个人名下) - A: IPv4 需要自己搭建服务器,并进行绑定 - 值参考: `1.2.3.4` (你服务器的 ip 地址) - AAAA: IPv6 需要自己搭建服务器,并进行绑定 - 不做表述,不太推荐非专业人士选择 - 如果你需要同时绑定 IPv4 和 IPv6 的话,建议建议注册 A 类型,然后 ISSUE 或邮件联系我配合处理 其中还有一项 Proxied(CDN),如果不知道作用,可以尝试开启或关闭来测试。 ## 邮箱申请 域名申请界面如下:  目前使用了 Cloudflare 的邮件转发服务,但由于暂不支持 IDN 域名,所以可以提前抢注,第一时间拥有。 ## 其他说明 ### 如需帮助 欢迎在 Github 上关注我: [willin](https://github.com/willin) ,如果在为心爱的她准备礼物时遇到问题,可以为你免费提供技术咨询。 ### 还想要其他的域名 - [js.cool](https://github.com/js-cool) (在多次协商后,目前已经支持 Vercel 绑定) - log.lu (敬请期待) ### 感觉慷慨 - 您可以将该网站分享给更多的人 - 您也可以通过以下渠道进行打赏: - [微信](https://willin.github.io/images/wx.png) - [支付宝](https://willin.github.io/images/alipay.png) - [爱发电](https://afdian.net/@willin) - [Github Sponsors](https://github.com/sponsors/willin) - [Paypal](https://www.paypal.com/paypalme/willinwang) ### 跃跃欲试 或许你也有很多想法,想要实现。您可以: - 使用 [Authing](https://www.authing.cn/?utm_source=v0&utm_campaign=hanhan) 快速集成开发你自己的应用 - Fork 本项目源码(完全开源),并提供你自己的域名服务 - [项目源码](https://github.com/willin/xn--wkua.xn--6qq986b3xL) - 在 Github 上对本项目进行完善和优化 - [项目后续规划](https://github.com/willin/xn--wkua.xn--6qq986b3xL/issues/3)

全栈框架应用快速集成 Authing SSO
分别以 Next.js 和 Remix 框架为例,讲解如何在半小时内快速集成 Authing SSO