Remix loader and clientLoader behavior
Nov 8, 20241 min read11
Search for a command to run...
Articles tagged with #remix
我使用Link组件,通过改变路由的params,进行语言切换,遇到了问题: 默认是en,从/account切换到/zh-CN/account是,没有发生任何的变化,loader也没有触发过,怎么回事呢。 Link是client-side路由组件,不会触发父路由的变化。 那这个怎么实现的呢? remix i18n blog 问题出在我的root组件,上面的逻辑都是没问题的,我是用params做多语言切换的,但是我的root组件却使用了loader,从loader获取到lang,传递给html的la...
有一个action用来切换深色模式,发现延迟很大,因为我首页有一个列表,是在loader加载的,每次都会重新加载。 During client-side transitions, Remix will optimize reloading of routes that are already rendering, like not reloading layout routes that aren't changing. In other cases, like form submission...