Pytanie jak w temacie dlaczego wyskakuje mi następujący błąd
Uncaught Invariant Violation: The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.
input wygląda tak
<input className='homePage__search-input' onFocus={this.handleFocus} onBlur={this.handleBlur} onChange={this.handleSearchChange} value={this.state.searchContent} style={this.state.focus && { border: '5px solid red' }}></input>
Oczywiście wiem, że jak zastosuję
style={this.state.focus ? { border: '5px solid red' }:{}}
wszystko będzie ok ale dlaczego nie mogę kożystać z && co jest ?
Czy ja powinienem jakoś inaczej zapisać ten warunek &&?
z góry dziękuje