为什么不能读取属性长度

  1. **

why cannot read length as it not defined in react js
import React, {useState } from "react"; export default function App() { const [state] = useState({ users: [], loading: false, }); const {users,loading}=state; return (

                  <div>
                    <Search 
                    Showclear={users.length> 0 ? true:false}

                    />

                  </div

                </div>
              );

**

评论