Unwanted re-renders after every dragEnter and dragLeave events
See original GitHub issueI faced the same problem as desrcibed in 839.
Every dragEnter event causes useDropzone
hook changing and re-render of whole component due to the fact, that this line never returns true, so this dispatch runs every time.
How can i prevent this behaviour and stop dragEnter event propagation correctly?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:20 (2 by maintainers)
Top Results From Across the Web
Unwanted React Component rerender? - Stack Overflow
When you add a new question, and update the Questions components state variable questions (Array type), the whole component ( Questions and ...
Read more >How to stop re-rendering lists in React? - Alex Sidorenko
Every time you update the property of one of the components in the list, the entire list re-renders. How to prevent that?
Read more >HTMLElement: dragleave event - Web APIs | MDN
The dragleave event is fired when a dragged element or text selection leaves a valid drop target. This event is not cancelable.
Read more >JSDoc: Class: ojChart - Oracle Help Center
A function that returns a custom data label. The function takes a dataContext argument, provided by the chart, with the following properties:.
Read more >Deprecations Added in Ember 3.x
Event such as originalEvent are deprecated. Especially addons are urged to not use any jQuery specific APIs, so they are able to work...
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 FreeTop 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
Top GitHub Comments
Yes the return will stop execution but I am facing the same issue. Clicking on the container even with noClick set to true triggers a rerender every time. Will take a look if I find the time.
That is expected behaviour. On any drag event you will get a render as the hook sets some props that are returned to the user. See https://github.com/react-dropzone/react-dropzone/blob/34bf6dbddd5ba8bd10394e183b5ee017cbf28d6b/src/index.js#L778