joshwcomeau / joshwcomeau/return-null

Render in DOMless Scope

Open
#1 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
35
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Hi there,

I really like your presentation on returning null. I am making an electron app and want to take advantage of the lifecycle methods. In the main scope, there is no dom, in here I have my app state container, I return null in the whole tree, including the root. However I can't initially render it because for initial render I am required to use ReactDOM.render like this:

ReactDOM.render(, document.getElementById('something'))

I have no DOM, is there anyway to render it?

If I try `null` as root I get error:

> Error: _registerComponent(...): Target container is not a DOM element.

I created a stackoverflow topic here - https://stackoverflow.com/q/45380656/1828637

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.