Tutorialsplane

ReactJs check empty Array or Object


We can use native JavaScript length property check whether the array or object is empty in Reacjs. Here in this tutorial, we are going to explain how you can check null array or object in Reactjs. You can also use our online editor to edit and run the code online.


ReactJs check empty Array or Object Example

You can check empty array or object in Reactjs simply as below-

Example:

<div id="root">
</div>

Try it ยป

Output of above example-

ReactJs Blog