diff --git a/examples/dom-cra/src/App.js b/examples/dom-cra/src/App.js
index 969da1c..0fe0821 100644
--- a/examples/dom-cra/src/App.js
+++ b/examples/dom-cra/src/App.js
@@ -11,7 +11,7 @@ const boxObjectConfig = {
const Box = ({id, sheet, selectedObject}) => {
// This is cheap to call and always returns the same value, so no need for useMemo()
- const obj = sheet.object(id, null, boxObjectConfig)
+ const obj = sheet.object(id, boxObjectConfig)
const isSelected = selectedObject === obj
@@ -38,7 +38,7 @@ const Box = ({id, sheet, selectedObject}) => {
},
onDrag(x, y) {
if (!firstOnDragCalled) {
- studio.__experimental_setSelection([obj])
+ studio.setSelection([obj])
firstOnDragCalled = true
}
scrub.capture(({set}) => {
@@ -61,7 +61,7 @@ const Box = ({id, sheet, selectedObject}) => {
return (
{
- studio.__experimental_setSelection([obj])
+ studio.setSelection([obj])
}}
ref={setDivRef}
style={{
@@ -88,7 +88,7 @@ const App = ({project}) => {
const [selection, _setSelection] = useState([])
useLayoutEffect(() => {
- return studio.__experimental_onSelectionChange((newSelection) => {
+ return studio.onSelectionChange((newSelection) => {
_setSelection(newSelection)
})
})
diff --git a/examples/dom-cra/src/index.js b/examples/dom-cra/src/index.js
index 91a7005..7d39d82 100644
--- a/examples/dom-cra/src/index.js
+++ b/examples/dom-cra/src/index.js
@@ -3,6 +3,8 @@ import './index.css'
import reportWebVitals from './reportWebVitals'
import studio from '@theatre/studio'
import {getProject} from '@theatre/core'
+import React from 'react'
+import App from './App'
studio.initialize()
diff --git a/examples/dom-cra/tsconfig.json b/examples/dom-cra/tsconfig.json
new file mode 100644
index 0000000..0eb8789
--- /dev/null
+++ b/examples/dom-cra/tsconfig.json
@@ -0,0 +1,14 @@
+{
+ "extends": "../../tsconfig.base.json",
+ "compilerOptions": {
+ "outDir": "dist",
+ "lib": ["ESNext", "DOM"],
+ "rootDir": "src",
+ "types": ["jest", "node"],
+ "emitDeclarationOnly": true,
+ "composite": true,
+ "checkJs": true
+ },
+ "references": [{"path": "../../theatre"}],
+ "include": ["./src/**/*"]
+}