feat: 首页更新
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
/**
|
||||
* Client-only value Hook
|
||||
*
|
||||
*
|
||||
* This hook is used to provide different values for server-side rendering (SSR)
|
||||
* and client-side rendering. It's particularly useful for React Native Web
|
||||
* to prevent hydration errors.
|
||||
*
|
||||
*
|
||||
* @param server - Value to use during server-side rendering
|
||||
* @param client - Value to use during client-side rendering
|
||||
* @returns The appropriate value based on the rendering context
|
||||
*
|
||||
*
|
||||
* @example
|
||||
* ```tsx
|
||||
* // Disable header on server, enable on client
|
||||
@@ -20,4 +20,3 @@
|
||||
export function useClientOnlyValue<S, C>(server: S, client: C): S | C {
|
||||
return client;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user