xiaobo.blogusing Inertia.js + react + rails to build a projectI'm currently using Inertia.js + react + rails to build a sample project provided by Inertia's official website, I use two sets of UI, one is chakra-ui and the other is antd-ui, I've been developing on the front end for years, using react, so I tried...Feb 2, 2024·1 min read
xiaobo.blogTurbo8 in rails7Turbo 8 简化了实时更新 Rails 应用程序的开发。通过最大限度地减少手动编码 Turbo 帧和 Turbo 流响应的需要,它比以前的版本实现了巨大的飞跃。这一进步简化了 Rails 应用程序的创建和维护,使您的工作效率更高。 如果您不熟悉 Turbo,它是 Ruby on Rails 应用程序广泛使用的一个库,用于部分更新页面,使它们感觉像单页 JavaScript 应用程序。它类似于 HTMX、StimulusReflex、Phoenix LiveView 和 Laravel Liv...Feb 2, 2024·2 min read
xiaobo.blogEvent LoopHave you ever encountered the following scenarios, why setTimeout will be executed after Promise? It is obvious that the code is written before Promise. This actually involves knowledge of Event Loop. In this chapter, we will learn more about Event L...Dec 13, 2023·3 min read
xiaobo.bloghow to use inertia-react with useFormThe problem I'm having is: after resetting the form with useForm's reset(), the data still doesn't change! import { useForm } from "@inertiajs/inertia-react"; const defaultFilterData: Filters = { search: '', trashed: '', role: '' } c...Oct 30, 2022·2 min read
xiaobo.blogHow to integrate a front-end framework into a Ruby on Rails projectI have many years of experience in front-end development and am currently on my way to full stack, choosing Ruby on rails as my full-stack framework. Although since the arrival of rails7 last year, hotwire can be said to shine on rails. I want to use...Oct 15, 2022·2 min read