-
Hey Ryan (et. al.) const Pane = props => {
const [children, setChildren] = createSignal([])
onMount(() => {
const paneDetails = TreeModel.getPane(props.paneId)
console.log(paneDetails.children, children())
setChildren(paneDetails.children)
console.log(paneDetails.children, children())
}
... The console logs are:
But, obviously, I'm expecting them to be:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yeah it's because the change hasn't been committed yet. I made a change about 6 months ago to batch work in Effects. It wasn't the only solution but it was the easiest to ensure timing in some of the trickier use cases (concurrent rendering and transitions). Under a batch Solid has the same timing as React. So you won't see the update until later. Basically all updates are collected and applied later. I need to document this. And probably look at the necessity of the Effect batching (although I'm pretty sure it is necessary in those cases). |
Beta Was this translation helpful? Give feedback.
Yeah it's because the change hasn't been committed yet. I made a change about 6 months ago to batch work in Effects. It wasn't the only solution but it was the easiest to ensure timing in some of the trickier use cases (concurrent rendering and transitions). Under a batch Solid has the same timing as React. So you won't see the update until later. Basically all updates are collected and applied later. I need to document this. And probably look at the necessity of the Effect batching (although I'm pretty sure it is necessary in those cases).