-
-
Notifications
You must be signed in to change notification settings - Fork 4
root-view removal while changing the direct child #13
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
Comments
This isn't just on the root view but even if you try to add an existing node again after it's been removed. The probable cause is that the instance itself is being deleted from react-native on removal and this brings up an issue where the DOM will have to maintain a re-creation task for every delete call. The positioning of this call can cause issues so might need more thinking but this does block creation of even the most basic of applications eg: const saView = document.createElement('SafeAreaView')
const text = document.createElement('Text')
const text2 = document.createElement('Text')
const text3 = document.createElement('Text')
text.textContent = 'First One'
text2.textContent = 'Second one'
text3.textContent = 'Third one'
Object.assign(text.style, styles.text)
Object.assign(text2.style, styles.text)
Object.assign(text3.style, styles.text)
saView.appendChild(text)
document.appendChild(saView)
setTimeout(() => {
saView.insertBefore(text2, text)
saView.removeChild(text)
saView.insertBefore(text3, text2) // will work
// saView.insertBefore(text, text2) // will bring up another view removal error but with an index mis-match
}, 1000) |
* hack: add a recreate method on each child node tree there's a new recreate method which get's fired everytime something is removed, since react native also removes it's existence from the native side causing re- mounting errors * simplify examples * add rebuildTree on append instead of remove * add a multipage example component * simplify nested condition for removal * change the increment count for allocation of tags hack to avoid colliding tags with react native * ci: disable build * chore: proper demo
Shows an error on the lines of
root views cannot be un-registered
when tryingto remove a node containing children or for anything where a UI library might
try to replace the child altogether
Issue exists in: 0.1.1-beta.10
The text was updated successfully, but these errors were encountered: