Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

updated dependencies, changed component to pure function using hooks #181

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zgabievi
Copy link

  • Updated dependencies to latest versions
  • Changed class component to pure function
  • Change states and lifecycles to hooks

@michaelwschultz
Copy link
Contributor

Duuuuude yes! @balloob, @markusenglund anyway we can get this merged in?

@joaopedrodcf
Copy link

Would be so awesome to get this merged!

@markusenglund
Copy link
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.

}
}
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}
Copy link

@joaopedrodcf joaopedrodcf Aug 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we are creating the ref with useRef hook I think we don't need this function anymore, what do you think?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants