这两种方法有什么区别?
将按钮的文本作为道具传递
<TextComponent title="Save"/>
function TextComponent(props){
return <button>{props.title}<button/>
}
Run Code Online (Sandbox Code Playgroud)
对比
小时候传文字
<TextComponent>Save<TextComponent />
function TextComponent(props){
return <button>{props.children}<button/>
}
Run Code Online (Sandbox Code Playgroud) 我正在使用 Elastic Search,并发现我们也可以在 Elastic 中使用 SQL 语法。通过SQL访问API查询和通过DSL查询有什么区别,哪个搜索速度更快?