Dune
Dune is a library, that combines a lot of commonly used functionality in JavaScript. It tries to ease common JS tasks.
It provides standalone functions, React components and Next.js-integrated components.
DOM + JS Helpers
children()
closest()
delegate()
find()
findFirst()
initDismissibleContainer()
isAbortError()
isChildOf()
next()
off()
on()
once()
onNextAnimationFrame()
onOff()
parseElementContentAsJson()
prev()
registerBodyClickHandler()
safeParseJson()
toggleClass()
trigger()
React Helpers
Some of these components / hooks are intended to be used in Next.js only, some can be used in a standalone React project. Look at the imports of the implementation to see which is Next.js-only.
-
React Components
-
React Hooks
-
Next.js Middleware Integrations