findDOMNode brings whole react-dom to the chunk
See original GitHub issuesay you have code like this
import Loadable from "react-loadable";
const PhoneAsync = Loadable({
loader: () => import("react-phone-number-input"),
loading: () => <span>Loading the phone number</span>
});
this will produce a separate chunk (I’m talking about webpack2+, like c-r-a setup). This chunk will look like this
![screen shot 2018-01-09 at 11 02 30](https://user-images.githubusercontent.com/179534/34715356-a2a08a0e-f52c-11e7-8d03-a4408a18e6b0.png)
Same issue in https://github.com/catamphetamine/input-format
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
ReactDOM – React
findDOMNode is an escape hatch used to access the underlying DOM node. In most cases, use of this escape hatch is discouraged because...
Read more >ReactDOM.render is no longer supported in React 18 - Stack ...
I get this error every time I create a new React app: Warning: ReactDOM.render is no ...
Read more >CSSTransition using findDOMNode which is deprecated in ...
A warning regarding the deprecation of findDOMNode is shown when using the SwitchTransition & CSSTransition in Strict mode (React v16.13.1).
Read more >Managing DOM components with ReactDOM - LogRocket Blog
Learn to expertly manage DOM components in a React app, including a deep dive into each ReactDOM method, with this comprehensive tutorial.
Read more >What is StrictMode in React? - KnowledgeHut
The fact that it gives visual feedback (warning/error messages) whenever the ... import ReactDOM from 'react-dom'; import React from 'react; ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I suppose you have extensive experience in implementing tree shaking and bundlers. I will not bother you with my comments anymore.
Yes I will use it in my application. I’m saying component should not depend on it.
Because webpack cannot do magic. You asked for it it gets it for you. Tree shaking is very limited - you can use https://www.npmjs.com/package/eslint-plugin-tree-shaking to see what won’t be tree shaken.