is it possible to conditionally render only the placeholder attribute in a input tag in react?

Sure, like this:

       return (
          <input  
            placeholder={tagsArrayEmpty ? 'enter your tags' : 'empty'}
            type="text"
          />
        )

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top