A guide to integrate Para SDK with TanStack Start while preserving server-side rendering capabilities.
app.config.ts
:process.browser
to true which helps modules determine the execution environmentReact.lazy
for dynamic loading and ClientOnly
from TanStack Router to prevent server rendering.
Create Environment Constants
src/constants.ts
:Environment.BETA
(alias Environment.DEVELOPMENT
) for testing, and
Environment.PROD
(alias Environment.PRODUCTION
) for live use. Select the environment that matches your current
development phase.Create a Providers Component
ClientOnly
component ensures that the ParaProvider is only rendered on the client side, preventing hydration mismatches. The fallback
prop determines what to show during server-side rendering.Wrap Your App with Providers
Lazy Load Para Components
React.lazy
and ClientOnly
:ParaContainer.tsx
:BETA
Environment, you can use any email ending in @test.getpara.com
(like
dev@test.getpara.com) or US phone numbers (+1) in the format (area code)-555-xxxx
(like (425)-555-1234). Any OTP
code will work for verification with these test credentials. These credentials are for beta testing only. You can
delete test users anytime in the beta developer console to free up user slots.React.lazy
and ClientOnly
, we ensure Para components are only evaluated in the browser environment where styled-components works correctly.
ParaModalProps
, refer to the customization guide:
Client-side Only Components
React.lazy
to dynamically import Para componentsClientOnly
from TanStack router to prevent server renderingPolyfill Issues
crypto
, buffer
, etc.), verify:vite-plugin-node-polyfills
app.config.ts
under the routers.client.vite.plugins
sectionprocess.browser
is set to true
in the base vite
section