本文实例讲述了react组件基本用法。分享给大家供大家参考,具体如下:
组件间传值:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>test</title> </head> <body> <div id="app"> </div> <script src="/UploadFiles/2021-04-02/react.production.min.js">列表:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>test</title> </head> <body> <div id="app"></div> <script src="/UploadFiles/2021-04-02/react.production.min.js">受控组件和非受控组件:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>test</title> </head> <body> <div id="app"></div> <script src="/UploadFiles/2021-04-02/react.production.min.js">组件生命周期:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Test</title> </head> <body> <div id="app"></div> <script src="/UploadFiles/2021-04-02/react.production.min.js">希望本文所述对大家react程序设计有所帮助。