diff --git a/src/components/App/index.js b/src/components/App/index.js
index ef53241..096e198 100644
--- a/src/components/App/index.js
+++ b/src/components/App/index.js
@@ -4,13 +4,12 @@ import { AppContextProvider } from 'components/AppContext';
import Form from 'components/Form';
import Loader from 'components/Loader';
import Message from 'components/Message';
-import SVG from 'components/SVG';
+import Render from 'components/Render';
class App extends React.PureComponent {
state={}
handleRender = ({ syntax, expr }) => {
- console.log('Render:', syntax, expr); // eslint-disable-line no-console
this.setState({ syntax, expr });
}
@@ -30,7 +29,7 @@ class App extends React.PureComponent {
Retry
-
+
;
}
}
diff --git a/src/components/SVG/index.js b/src/components/Render/index.js
similarity index 81%
rename from src/components/SVG/index.js
rename to src/components/Render/index.js
index e7caa56..d76f67a 100644
--- a/src/components/SVG/index.js
+++ b/src/components/Render/index.js
@@ -6,7 +6,7 @@ import style from './style.module.css';
import AppContext from 'components/AppContext';
-class SVG extends React.PureComponent {
+class Render extends React.PureComponent {
static contextType = AppContext
svgContainer = React.createRef()
@@ -33,6 +33,10 @@ class SVG extends React.PureComponent {
}
render() {
+ const { syntax, expr } = this.context;
+
+ console.log('Render:', syntax, expr); // eslint-disable-line no-console
+
// Demo rendering for now
return
@@ -40,4 +44,4 @@ class SVG extends React.PureComponent {
}
}
-export default SVG;
+export default Render;
diff --git a/src/components/SVG/style.module.css b/src/components/Render/style.module.css
similarity index 100%
rename from src/components/SVG/style.module.css
rename to src/components/Render/style.module.css