Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert the segmented control into React Hooks #16

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

alotama
Copy link

@alotama alotama commented Jun 4, 2019

No description provided.

@lorensr
Copy link
Owner

lorensr commented Jun 4, 2019

Hey, thanks for the contribution. I'll merge if you can get storybook working (npm start):

image

@lorensr
Copy link
Owner

lorensr commented Jun 4, 2019

Also, looks like the effect is returning an extra function? And can add [] to have it only run on mount:

  useEffect(() => {
    const defaultOption = find(options, { default: true })
    setValue(defaultOption.value)
  }, [])

@alotama
Copy link
Author

alotama commented Jun 4, 2019

I would check it!

@alotama
Copy link
Author

alotama commented Jun 4, 2019

I upgraded the version of React in the dependencies. I also convert the FormsySegmentedControl to Hooks

@lorensr
Copy link
Owner

lorensr commented Jun 6, 2019

What's the "Mapa"? ☺️

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

Successfully merging this pull request may close these issues.

2 participants