You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSX templates can be hard to read easily, when logic is added.
<buttononClick$={()=>{constnextVideoIndex=state.index+1>=props.videos.length
? props.videos.length-1
: state.index+1;state.video=props.videos[nextVideoIndex];state.index=nextVideoIndex;}}>
Next Video
</button>
Proposal
We can encourage developers to extract logic into self-descriptive functions.
This implicitly adds documentation due to function-naming + the template's complexity decreases.
Motivation
JSX templates can be hard to read easily, when logic is added.
Proposal
We can encourage developers to extract logic into self-descriptive functions.
This implicitly adds documentation due to function-naming + the template's complexity decreases.
The text was updated successfully, but these errors were encountered: