basic interqctivity
This commit is contained in:
		
							parent
							
								
									9e0d569eaf
								
							
						
					
					
						commit
						8a35feef7f
					
				
							
								
								
									
										13
									
								
								src/App.js
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								src/App.js
									
									
									
									
									
								
							@ -1,7 +1,18 @@
 | 
				
			|||||||
import './App.css';
 | 
					import './App.css';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function Square({ value }) {
 | 
					function Square({ value }) {
 | 
				
			||||||
  return <button className="square">{value}</button>;
 | 
					  function handleClick() {
 | 
				
			||||||
 | 
					    console.log('clicked!');
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return ( 
 | 
				
			||||||
 | 
					    <button 
 | 
				
			||||||
 | 
					      className="square"
 | 
				
			||||||
 | 
					      onClick={handleClick}
 | 
				
			||||||
 | 
					    >  
 | 
				
			||||||
 | 
					      {value}
 | 
				
			||||||
 | 
					    </button>
 | 
				
			||||||
 | 
					  );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function App() {
 | 
					function App() {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user