Sha256: 7985c6a59915e8d0ffe92a949be0cf627afc85f8338698fc02628d80c71a1387
Contents?: true
Size: 650 Bytes
Versions: 4
Compression:
Stored size: 650 Bytes
Contents
import ReactDOM from 'react-dom'; import loadTranslations from './support/load_translations'; import Comments from './comments/comments.component'; // Expose global components window.DecidimComments.renderCommentsComponent = (nodeId, props) => { var node = $(`#${nodeId}`)[0]; ReactDOM.render( React.createElement(Comments,props), node ); function unmountComponent() { ReactDOM.unmountComponentAtNode(node); $(document).off('turbolinks:before-render', unmountComponent); } $(document).on('turbolinks:before-render', unmountComponent); }; // Load component locales from yaml files loadTranslations();
Version data entries
4 entries across 4 versions & 2 rubygems