Merged
Conversation
…r and client. Added `ssrMode` prop, hydration-aware components, and improved compatibility with Next.js and similar frameworks. Enhanced package exports for CSS resolution in SSR environments.
This commit introduces an `ssrMode` flag across components for improved SSR compatibility, ensuring stable initial renders. It also implements hydration tracking to switch between SSR-based and dynamic values post-hydration, enhancing responsiveness and accuracy. Relevant tests and styles have been updated to reflect the changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces comprehensive Server-Side Rendering (SSR) support to the
baseline-kitpackage. It includes updates to the components and documentation to ensure consistent rendering between server and client, and to improve compatibility with popular frameworks like Next.js and Remix.Improvements to SSR support:
Changelog and Documentation Updates:
CHANGELOG.md: Added a new section for version 2.1.0, detailing the SSR support and other minor changes.README.md: Added a new section explaining the SSR compatibility and design, including thessrModeprop for components.Component Updates:
Baseline.tsx: IntroducedssrModeprop and added logic to handle SSR-compatible rendering and hydration. [1] [2] [3] [4]Box.tsx: AddedssrModeprop and implemented hydration-aware rendering for padding calculations. [1] [2] [3] [4]Guide.tsx: Enhanced to support SSR with thessrModeprop and stable initial dimensions. [1] [2] [3] [4]Layout.tsx: Updated to includessrModeprop and handle SSR-compatible padding and grid layout. [1] [2] [3] [4]Padder.tsx: AddedssrModeprop and logic for stable padding during SSR. [1] [2] [3] [4] [5] [6]Utility Updates:
package.json: Updated build scripts and package version to 2.1.0, and adjusted exports for proper CSS file resolution in SSR environments. [1] [2]These changes ensure that the
baseline-kitcomponents render consistently across server and client environments, improving the overall developer experience and compatibility with SSR frameworks.