Skip to content

Commit

Permalink
fixup! Remove ably-ui gem building and release tools
Browse files Browse the repository at this point in the history
  • Loading branch information
dpiatek committed Dec 13, 2023
1 parent 959ff13 commit aff6f9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 0 additions & 4 deletions scripts/setup-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,11 @@ const sync = ({ verbose } = { verbose: false }) => {
log("");

modules.forEach((mod) => {
copyCompiledModuleAssets(mod);
copyFonts(mod);
copyImages(mod);
copyIconSprites(mod);
createGitignoreFiles(mod);

mod.components.forEach((componentName) => {
copyComponentTemplates(mod, componentName);
copyCompiledComponentAssets(mod, componentName);
copyComponentData(mod, componentName);
});
});
Expand Down
11 changes: 7 additions & 4 deletions src/core/react-renderer.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import React from "react";
import ReactDOM from "react-dom";
import { createRoot } from 'react-dom/client';

const renderComponent = (Component, props, node) =>
const renderComponent = (Component, props, node) => {
const root = createRoot(node);
// eslint-disable-next-line react/no-render-return-value
ReactDOM.render(<Component {...props} />, node);
root.render(<Component {...props} />);
}

export { renderComponent };

Expand All @@ -19,7 +21,8 @@ export default function reactRenderer(components) {
const propsJson = node.getAttribute("data-react-props");
const props = propsJson && JSON.parse(propsJson || {});

ReactDOM.render(<Constructor {...props} />, node);
const root = createRoot(node);
root.render(<Constructor {...props} />);

node.removeAttribute("data-react");
node.removeAttribute("data-react-props");
Expand Down

0 comments on commit aff6f9b

Please sign in to comment.