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

Programatically change switch #4

Merged
merged 2 commits into from
Aug 16, 2017
Merged

Programatically change switch #4

merged 2 commits into from
Aug 16, 2017

Conversation

ShaunEvening
Copy link
Contributor

Pull Request

Related Issue(s):

Changes Introduced

  • Remove defaultValue property
  • Remove value from component state and make it a property
  • Update README.md to reflect the changes to props,
  • Move all properties in README.md into a markdown table for nicer formatting

Why were these changes made?

Hey @baderahmed,

I'm currently working on a project that requires custom styled switch components and your module is the best I've found for our needs. However, in this project we would like to control the state of these switches from a parent component. This PR introduces a change that moves the storage and control to the component's active/inactive state to it's props. This allows someone to control the active state of a switch from a parent component's state, or, in my case redux. This should also solve for the use case @rajesh1158 outlined in issue #3

Platforms affected

  • iOS
  • Android

Documentation

The README.md file has been updated to reflect the changes in the properties

@baderahmed baderahmed merged commit 5f06710 into baderahmed:master Aug 16, 2017
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