This repository was archived by the owner on Jun 3, 2020. It is now read-only.
updated dependencies, changed component to pure function using hooks#181
Open
zgabievi wants to merge 1 commit intoballoob:masterfrom
Open
updated dependencies, changed component to pure function using hooks#181zgabievi wants to merge 1 commit intoballoob:masterfrom
zgabievi wants to merge 1 commit intoballoob:masterfrom
Conversation
zgabievi
commented
Feb 20, 2019
- Updated dependencies to latest versions
- Changed class component to pure function
- Change states and lifecycles to hooks
Contributor
|
Duuuuude yes! @balloob, @markusenglund anyway we can get this merged in? |
|
Would be so awesome to get this merged! |
Collaborator
|
I haven't really had the time to review PRs or maintain the library unfortunately. Maybe we could give commit access to someone else if people think it's important that it gets updated. |
| saveSidebarWidth(); | ||
| } | ||
| } | ||
| }); |
There was a problem hiding this comment.
Should we try to call this hook only when touchParams.identifier changes, could be something like this:
useEffect(() => {
saveSidebarWidth();
}, [touchParams.identifier]);| <div | ||
| className={props.sidebarClassName} | ||
| style={sidebarStyle} | ||
| ref={saveSidebarRef} |
There was a problem hiding this comment.
Should here we just pass the sidebarRef? We created the ref with useRef hook so the old function maybe is unnecessary
ref={sidebarRef}| saveSidebarRef(node) { | ||
| this.sidebar = node; | ||
| } | ||
| const saveSidebarRef = node => { |
There was a problem hiding this comment.
As we are creating the ref with useRef hook I think we don't need this function anymore, what do you think?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.