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

use modal #94

Open
maratgaip opened this issue Apr 18, 2017 · 1 comment
Open

use modal #94

maratgaip opened this issue Apr 18, 2017 · 1 comment

Comments

@maratgaip
Copy link

not issue but i have a questions. how am gonna use modal? for example i want to change sign-in button and open modal when it's clicked.
i don't need to import modal component because it's already imported right?
should i pass to redux or ?

thanks in advance.

@andrewngu
Copy link
Owner

andrewngu commented Apr 18, 2017

use dispatch(openModal('someIdentifier'))

then in Modal.js, add another case block in the switch-case statement.

switch (modal) {
  case 'login':
    return <Login />;
  case 'someIdentifier':
    return <MyNewComponent />;
  default:
    return <div />;
}

Let me know if this makes sense.

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

No branches or pull requests

2 participants