安装inde.html使用babel,reactjs – 使用Babel Standalone进行单个React组件渲染,仅使用index.html和Component...
生活随笔
收集整理的這篇文章主要介紹了
安装inde.html使用babel,reactjs – 使用Babel Standalone进行单个React组件渲染,仅使用index.html和Component...
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
Noob與React在這里.我正在玩React.我有一個簡單的組件在我的component.js中呈現(xiàn).它包含在我的index.html文件中.我在頭部包含了React,ReactDOM和babel的腳本.我只想看到一個div正確渲染.我還沒有使用Node,只是使用React和Babel(使用
babel-standalone).我正在使用一個簡單的http服務(wù)器運(yùn)行該文件.我在使用React Chrome擴(kuò)展程序時(shí)遇到錯誤:等待root加載…重新加載檢查器點(diǎn)擊此處.
的index.html
`
components.js
class MachineBox extends React.Component {
render(){
return (
Hello From React );}
}
let target = document.getElementById('machine-box');
ReactDOM.render(
, target
)
總結(jié)
以上是生活随笔為你收集整理的安装inde.html使用babel,reactjs – 使用Babel Standalone进行单个React组件渲染,仅使用index.html和Component...的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 国标流媒体H5实现无插件视频监控按需直播
- 下一篇: 550什么意思_研报翻译官第二期:带你了