Skip to main content

时间线常见问题

🌐 Timeline FAQ

这个模板可以在 React 18 中使用吗?

🌐 Will the template work with React 18?

是的,该模板与 React 18 完全兼容。我们有意避免使用 React 19 特有的功能,例如 use() 钩子或新的直接组件 ref 传递,以确保向下兼容。这意味着你可以放心地在 React 18 项目中使用此模板,而无需担心兼容性问题。

🌐 Yes, the template is fully compatible with React 18. We've intentionally avoided using React 19-specific features like the use() hook or the new direct component ref-passing to ensure backward compatibility. This means you can confidently use this template with React 18 projects without encountering compatibility issues.

如果你在使用该模板与 React 18 时确实遇到任何问题或意外行为,请在仓库中创建一个问题。

🌐 If you do experience any problems or unexpected behavior while using the template with React 18, please create an issue in the repository.

该模板包含状态管理库吗?

🌐 Does the template include state management libraries?

不,我们使用 React Context 进行基本的状态管理,而不是使用像 Zustand 或 Redux 这样的第三方库。

🌐 No, we use React Context for basic state management instead of third-party libraries like Zustand or Redux.

这个决定不是关于保持“纯粹性”——而是关于实用性。状态管理库通常需要特定的架构方法,并且可能会过时或限制灵活性。通过坚持使用 React Context,我们提供了一个在大多数用例中都能很好运行,同时保持可适应性的基础。

🌐 This decision wasn't about maintaining "purity" - it's about practicality. State management libraries often require specific architectural approaches and can become outdated or limit flexibility. By sticking with React Context, we provide a foundation that works well for most use cases while remaining adaptable.

如果你的项目需要更复杂的状态管理以优化性能,你可以轻松添加最适合你特定需求的库。无论是因为简单而选择 Zustand,还是为了处理复杂状态而选择 Redux,或者完全选择其他东西——选择权在你,并且可以根据你的具体应用需求进行定制。

🌐 If your project needs more sophisticated state management for performance optimization, you can easily add the library that best fits your specific requirements. Whether that's Zustand for its simplicity, Redux for complex state, or something else entirely - the choice is yours and can be tailored to your particular application needs.

我们的目标是提供一个适合所有人的模板,而不对你的项目施加不必要的意见或复杂性。

🌐 Our goal is to provide a template that works well for everyone without imposing unnecessary opinion or complexity on your project.