Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render jsmind node in a synchronized mode #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hizzgdev
Copy link

ReactDOM.render 这个方法应该是异步执行的,我看它的方法签名里还有一个 callback 的参数。
你可以实验一下在 render 之后紧接着 console.log(element.innerHTML) 会发现里面是空的。

所以用 dom 的原生方法替换到 ReactDOM.render就可以了。

如果要 render 的内容比较复杂,想用 React 来构建的话,我觉得应该有某种方式能让 React 以同步的方式 render 这些 element.我搜索发现应该是可以做到的,但是我没弄出来。 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant