Skip to content

Instantly share code, notes, and snippets.

@SephReed
Created July 9, 2019 17:52
Show Gist options
  • Save SephReed/60e0f002dbd0082b611ea716ad0546b5 to your computer and use it in GitHub Desktop.
Save SephReed/60e0f002dbd0082b611ea716ad0546b5 to your computer and use it in GitHub Desktop.
return div("user-div", {
// shortcut for adding/removing classnames based off state
ddxClass: () => state.userSelected ? "--selected" : "",
// shortcut for general purpose SDx manipulation
ddx: (userDiv) => userDiv.tabIndex = state.userTabIndex
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment