Learn how to use TypeConf in your Next.js projects
This guide shows you how to integrate TypeConf into your Next.js project for type-safe configuration management.
Create your configuration files in a dedicated directory:
You can create multiple config files.
In configs/main.tsp
:
In configs/user-settings.config.ts
:
First install the React SDK:
Then generate the config and types:
Typeconf React SDK provides both server and client side helpers. Here’s how to use it in a server component:
For client-side configuration you need to add a provider to the layout:
Then in the component you can use the useTypeconf
hook:
Learn how to use TypeConf in your Next.js projects
This guide shows you how to integrate TypeConf into your Next.js project for type-safe configuration management.
Create your configuration files in a dedicated directory:
You can create multiple config files.
In configs/main.tsp
:
In configs/user-settings.config.ts
:
First install the React SDK:
Then generate the config and types:
Typeconf React SDK provides both server and client side helpers. Here’s how to use it in a server component:
For client-side configuration you need to add a provider to the layout:
Then in the component you can use the useTypeconf
hook: