我做了这段代码
export default class App extends Component {
render() {
return (
<Request
url='http://localhost:3000/mz/api/lookup?a=3&b=6'
method='get'
accept='application/json'
verbose={true}>
{({error, result, loading}) => {
console.log(result,"helllo")
if (loading) {
return <div>loading...</div>;
} else {
return <div>{ JSON.stringify(result.text) }</div>;
}
}
}
</Request>
);
}
}
render(<App/>,document.querySelector('.container'));
如何向此代码添加查询或参数我希望a和b的值是更改,因为我输入我的意思是它就像params或在url中查询,值在用户点击路径时输入