@textbus/adapter-react 4.0.0-alpha.69 → 4.0.0-alpha.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -93,8 +93,7 @@ class ReactAdapter extends DomAdapter {
93
93
  useEffect(() => {
94
94
  this.onViewUpdated.next();
95
95
  }, [updateKey]);
96
- component.__slots__.length = 0;
97
- this.componentRendingStack.push(component);
96
+ component.state.length = 0;
98
97
  const vNode = components[key]({
99
98
  component,
100
99
  rootRef: (rootNode) => {
@@ -107,10 +106,6 @@ class ReactAdapter extends DomAdapter {
107
106
  }
108
107
  });
109
108
  useEffect(() => {
110
- const context = this.componentRendingStack[this.componentRendingStack.length - 1];
111
- if (context === component) {
112
- this.componentRendingStack.pop();
113
- }
114
109
  if (!this.componentRootElementCaches.get(component)) {
115
110
  // eslint-disable-next-line max-len
116
111
  throw adapterError(`Component \`${component.name}\` is not bound to rootRef, you must bind rootRef to the root element node of the component view.`);
package/bundles/index.js CHANGED
@@ -95,8 +95,7 @@ class ReactAdapter extends platformBrowser.DomAdapter {
95
95
  react.useEffect(() => {
96
96
  this.onViewUpdated.next();
97
97
  }, [updateKey]);
98
- component.__slots__.length = 0;
99
- this.componentRendingStack.push(component);
98
+ component.state.length = 0;
100
99
  const vNode = components[key]({
101
100
  component,
102
101
  rootRef: (rootNode) => {
@@ -109,10 +108,6 @@ class ReactAdapter extends platformBrowser.DomAdapter {
109
108
  }
110
109
  });
111
110
  react.useEffect(() => {
112
- const context = this.componentRendingStack[this.componentRendingStack.length - 1];
113
- if (context === component) {
114
- this.componentRendingStack.pop();
115
- }
116
111
  if (!this.componentRootElementCaches.get(component)) {
117
112
  // eslint-disable-next-line max-len
118
113
  throw adapterError(`Component \`${component.name}\` is not bound to rootRef, you must bind rootRef to the root element node of the component view.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/adapter-react",
3
- "version": "4.0.0-alpha.69",
3
+ "version": "4.0.0-alpha.71",
4
4
  "description": "Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.",
5
5
  "main": "./bundles/index.js",
6
6
  "module": "./bundles/index.esm.js",
@@ -26,8 +26,8 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "@tanbo/stream": "^1.2.5",
29
- "@textbus/core": "^4.0.0-alpha.69",
30
- "@textbus/platform-browser": "^4.0.0-alpha.69",
29
+ "@textbus/core": "^4.0.0-alpha.71",
30
+ "@textbus/platform-browser": "^4.0.0-alpha.71",
31
31
  "react": "^17.0.0 || ^18.0.0"
32
32
  },
33
33
  "devDependencies": {
@@ -49,5 +49,5 @@
49
49
  "bugs": {
50
50
  "url": "https://github.com/textbus/textbus.git/issues"
51
51
  },
52
- "gitHead": "f2d53e02abbbc466b289532f6773c6fa8bb4d3f3"
52
+ "gitHead": "cf4fd289b73bc777124a32fe42bb58eba05a34f1"
53
53
  }