Value must be omitted for boolean attributes
13 {data.map((p, idx) => {
14 return (
15 <div key={idx}>
16 <ProductCard product={p} showDesc={true} />17 </div>
18 )
19 })}
Value must be omitted for boolean attributes
83 data={post}
84 channel={channel}
85 color={channels[channel].color}
86 showDivider={true} 87 />
88 </div>
89 )
Value must be omitted for boolean attributes
201 </div>
202 <input
203 type="file"
204 multiple={true}205 ref={fileRef}
206 hidden
207 onChange={(e) => addImage(e)}
Value must be omitted for boolean attributes
106
107 <input
108 type={'file'}
109 multiple={true}110 ref={fileRef}
111 hidden
112 onChange={(e) => handleNewImage(e)}
Value must be omitted for boolean attributes
172 userInfo.products.map((p) => {
173 return (
174 <div key={p.ID} className={'flex items-center'}>
175 <ProductCard product={p} showDesc={true} />176 <Button
177 size={'sm'}
178 style={{
Description
When using a boolean attribute in JSX, you can set the attribute value to true or omit the value. This helps to keep consistency in code.
Bad Practice
var Hello = <Hello personal={true} />;
Recommended
var Hello = <Hello personal />;