Comments (4)
The reason the lib is changing the body class is because it usually happen that when dragging a splitter while resizing the mouse pointer is not exactly on top of the splitter element, hence if the cursor css is only applied to that element it causes a flickering as the cursor icon is intermittently being modified. That way it's constant during the drag.
It is surprising to me that your whole app is being rerendered as it is using directly DOM API and doesn't affect React props. I think a workaround would be to optimize your root component or some parent component (your table or higher in the hierarchy) to not rerender as their props is obviously not changed. If your table component is that heavy to render it is anyway a good initiative to optimize its rendering to the strict minimum.
from re-flex.
Thanks for the explanation @leefsmp, I didn't check what happens with the cursor during resize operation. I investigated the performance problems I have with my tables and was stumbling across the fact that clicking the ReflexSplitter without actually resizing already produces a lag of 2 seconds. The class names that are added to the body trigger a style recalculation of the whole app which are quite expensive in my case.
I'm using Reflex to resize a layout with several tables so I can't avoid rendering the tables. Optimizing my table styles was not sufficient, but virtualizing the tables seems to do the trick.
from re-flex.
I'm testing with this simple codepen and I can't reproduce the behavior you describe, resizing the splitter will not trigger a re-render of the containing component. The issue you are describing here seems to be specific to your project. If you can provide a testable minimal case that would be helpful.
from re-flex.
closing as non-reproducible.
from re-flex.
Related Issues (20)
- Component state is reinitialized when a ReflexElement is collapsing HOT 1
- React 18 typescript problem HOT 5
- Cannot read property 'ref' of undefined HOT 2
- React 18 peers dependency HOT 1
- Not working with nextjs HOT 9
- windowResizeAware horizontal container HOT 1
- ag-grid doesn't display in a resizable pane HOT 6
- Contrlled elemented example with functional components HOT 1
- Problem installing v4.0.11 on Yarn HOT 4
- node-sass as a dependency? HOT 1
- Where to find a description of version changes? HOT 1
- Reflex doesn't render properly when used in a <Suspense> HOT 2
- Question: Need to wrap "ReflexSplitter" inside "SplitterControl" component to add custom logic HOT 4
- Make component work with Content Security Policy by adding nonce attribute HOT 1
- Remove unnecessary console.logs from ReflexSplitter.js HOT 1
- Question: How to disable the ReflexSplitter? HOT 2
- can you add a new feature please HOT 1
- ReflexElement element size is not updated when the value passed to minSize prop is changed HOT 3
- Reflex element with a specific flex is displayed incorrectly, when the container size changed HOT 3
- react-reflex Doesn't Seem to Work as Expected Inside FrameComponent HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from re-flex.