mirror of
				https://github.com/vuejs/babel-plugin-jsx.git
				synced 2025-10-31 01:12:17 +08:00 
			
		
		
		
	jsx
This commit is contained in:
		
							
								
								
									
										26
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								README.md
									
									
									
									
									
								
							| @@ -1,2 +1,24 @@ | ||||
| # jsx | ||||
| jsx for vue 3 | ||||
| # Babel Preset JSX for Vue 3.0 | ||||
|  | ||||
| To add Vue JSX support. | ||||
|  | ||||
| ## Syntax | ||||
|  | ||||
| functional component | ||||
|  | ||||
| ```jsx | ||||
| const App = () => <div></div> | ||||
| ``` | ||||
|  | ||||
| with setup render | ||||
|  | ||||
| ```jsx | ||||
| const App = defineComponent(() => { | ||||
|   const count = ref(0); | ||||
|   return () => ( | ||||
|     <div> | ||||
|       {count.value} | ||||
|     </div> | ||||
|   ) | ||||
| }) | ||||
| ``` | ||||
|   | ||||
		Reference in New Issue
	
	Block a user