M
M
Maksipes2018-07-18 15:12:14
1C-Bitrix
Maksipes, 2018-07-18 15:12:14

How to embed a React component in 1C-Bitrix: Site Management?

There is a site on Bitrix, there is a small interactive component written by React.js, it needs to be displayed in the page template of the site on Bitrix.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2018-07-18
@maksipes

And what's the problem?
Sample:

<div id="my-react-module-root"></div>
<script type="text/javascript" src="my-react-module-bundle.js"></script>

Point of entry:
import React from 'react';
import { render } from 'react-dom';
import MyReactModule from './MyReactModule';

render(
  <MyReactModule />,
  document.getElementById('my-react-module-root'),
);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question