Skip to content

Commit

Permalink
Merge pull request #114 from artsy/fix-prefer-settimeout
Browse files Browse the repository at this point in the history
fix: setTimeout
  • Loading branch information
damassi authored Oct 30, 2020
2 parents db80fd1 + 5534312 commit 8999546
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internal/clientRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function clientRenderer({
const components = Object.entries(modules).reduce(
(moduleMap, [moduleName, Module]: any[]) => {
const Component = (props: Partial<SerializableComponent> = {}) => {
setImmediate(() => {
setTimeout(() => {
if (!props.mountId) {
console.error(
"[@artsy/stitch] Error mounting clientside component: `mountId` is " +
Expand All @@ -37,7 +37,7 @@ export function clientRenderer({
</Wrapper>,
mountPoint
)
})
}, 0)
}

return {
Expand Down

0 comments on commit 8999546

Please sign in to comment.