3 回答

TA貢獻1777條經驗 獲得超10個贊
路由(routing)是指分組從源到目的地時,決定端到端路徑的網絡范圍的進程[1] 。路由工作在OSI參考模型第三層——網絡層的數據包轉發設備。路由器通過轉發數據包來實現網絡互連。雖然路由器可以支持多種協議(如TCP/IP、IPX/SPX、AppleTalk等協議

TA貢獻1817條經驗 獲得超14個贊
這個是相當容易的,在使用 React 開發的過程中經常會使用到,主要是利用 props 來進行交流。例子如下:
// 父組件
var MyContainer = React.createClass({
getInitialState: function () {
return {
checked: true
};
},
render: function() {
return (
<ToggleButton text="Toggle me" checked={this.state.checked} />
);
}
});
// 子組件
var ToggleButton = React.createClass({
render: function () {
// 從【父組件】獲取的值
var checked = this.props.checked,
text = this.props.text;
return (
<label>{text}: <input type="checkbox" checked={checked} /></label>
);
}
});
- 3 回答
- 0 關注
- 3914 瀏覽
添加回答
舉報