React for Beginners

5

#npm create vite@latest
npm create vite@4.1.0

6

7

// src/App.tsx 
import './App.css'
import Message from './Message'

function App() {
    return (
        
) } export default App
// src/Message.tsx
export default function Message() {
    // const name = ''
    const name = 'Mosh'
    if (name)
        return 

hello {name}

return

hello World

}

8

9

10

11


  转载请注明: malred-blog React for Beginners

  目录