question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ReactMount - refactor to not rely on the DOM

See original GitHub issue

As seen here (https://github.com/facebook/react-native/blob/master/Libraries/ReactNative/ReactNativeMount.js#L86)

“As soon as ReactMount is refactored to not rely on the DOM, we can share code between the two. For now, we’ll hard code the ID logic.”

Is this still wanted? I’m working on a project where it would help if ReactMount was not dependant on the DOM as it has a different render target. I don’t mind taking a look at doing this, but I just want to check if it’s a wanted feature or whether in cases like mine I should just go about writing a completely new renderer.

I think it would be useful as it would make it easier to use React for projects which aren’t DOM related.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
gaearoncommented, Oct 27, 2016

We’re changing all internals and this will no longer be relevant after a while.

0reactions
madjam002commented, Aug 13, 2015

@sebmarkbage Okay thanks for clarifying that. So 0.14 for the time being will be dependant on the DOM then? It would be cool if the injection could be called somewhere else other than when the react package is loaded, maybe in the render function because then other renderers could inject their own plugins? (For now at least until it’s all done statically)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Cannot resolve module 'react/lib/ReactMount' " - Stack ...
You are using an old version that relies on the ReactMount.js file being present in the node_modules/react/lib folder. There is no easy one ......
Read more >
Refactor how composite type changes work, fix memory leak ...
A declarative, efficient, and flexible JavaScript library for building user interfaces. - Refactor how composite type changes work, fix memory leak in ...
Read more >
Refs and the DOM - React
Refs provide a way to access DOM nodes or React elements created in the render method. In the typical React dataflow, props are...
Read more >
useEffect(fn, []) is not the new componentDidMount()
Refactoring from classes to hooks will not mean you simply replace your ... The return value of render() is used to mount new...
Read more >
How to Unmount a ReactJS Node - Pluralsight
It will return the DOM node where the component is rendered, or if not, it will return “null” as a result. The function...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found