Files
4eb0da 163b84dfe8 Json check
commit_hash:10a3c5dfdd683847ef54ab05c16ef2e1fc15f248
2026-05-11 13:09:17 +03:00
..
2022-08-26 03:52:29 +03:00
2022-08-26 03:52:29 +03:00
2022-11-23 12:06:10 +03:00
2026-05-11 13:09:17 +03:00
2026-05-11 13:09:17 +03:00
2022-08-26 03:52:29 +03:00
2026-05-11 13:09:17 +03:00
2022-08-26 03:52:29 +03:00

Render DivJson inside React app

Install the packages first:

npm сi

Please, note that @divkit/divkit/dist/client.css imported as module. The css file can be included in any way.

Then you can use the component as follows:

import { DivKit } from '@divkit/react';
import '@divkitframework/divkit/dist/client.css';

<DivKit id="test" json={json} />;

This component supports SSR, but contains extra code for this. To split unused code, you need to set env variable process.env.IS_SERVER in the build configuration:

new webpack.DefinePlugin({
    'process.env.IS_SERVER': JSON.stringify(isServer),
})