DEV Community

Discussion on: How to make your own SplitPane React component with 0 dependencies

Collapse
 
christopherhbutler profile image
Christopher Harold Butler • Edited

Hi! I was following your awesome tutorial but tried to modify it to be either a vertical or horizontal split pane and to use styled components but I have a small issue. Everything seems to work fine except that the value for the topHeight (which I renamed to _splitterDistance) seems to jump back to the initial value after the second resize. I opened a question on stack overflow here (stackoverflow.com/questions/607020...) and also made a code pen (codesandbox.io/s/intelligent-ediso...). Do you think you could offer any help? It would be greatly appreciated!