Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. class CreditCart extends React.Component {
  2. constructor(props) {
  3. super(props);
  4. this.state = {show:false};
  5.  
  6. this.handleClick = this.handleClick.bind(this);
  7. }
  8. handleClick () {
  9. this.setState({ show : !this.state.show})
  10.  
  11.  
  12. }
  13. render () {
  14. return (
  15. //2 input here credir-cart has onClick
  16.  
  17.  
  18. {this.state.show && <CreditCart/>
  19.  
  20.  
  21. }
  22.  
  23. class CreditCart extends React.Component {
  24. constructor(props) {
  25. super(props);
  26. }
  27. render () {
  28. // information part
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement