2.4.15-1 • Published 1 year ago

@noaignite-dk/utils-next v2.4.15-1

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Utilities for Nextjs

This is a collection of utilities for Nextjs. @see Noa Ignite DK

Dependencies

  • Requires react@18.x or higher
  • Requires next@12.x or higher

Helpers

faac.tsx

Function As a Child Pass properties from the component to the child.

Note Useful for rendering either React {children} or function with properties as children.

fonts.tsx

Fonts Helper for adding fonts with <link /> tags for the Next _documents.tsx

record_render.tsx

RecordRender Return a specific component from a record, based on the passed id.

Note Useful for rendering different components for different loading states.

server.tsx

Helpers for Server Side logic.

Available Hooks

use_click_outside.ts

Event hook for detecting click outside of an element.

Note Useful for popups/dialogs

use_delayed_state.ts

State hook with possibility for delaying.

Note Useful for simulating loading states.

use_disclosure.ts

State hook for toggling a state including callbacks

Note Useful for showing/hiding items

use_event_listeners.ts

Event hook for listening to events.

use_interval.ts

Event hook for setting an interval.

use_is_mounted.ts

State hook for detecting if component is mounted.

Note Useful for waiting for waiting for DOM to be ready.

use_isomorphic_layout_effect.ts

Ismorphic hook for running effects both on server and client side.

use_memo_key.ts

Hook returns a memorizable string based on a non-primitive value.

use_preserve_string.ts

State hook for preserving a string after it's been cleared.

Note Useful for showing error messages which value disappears

use_previous.ts

Reference hook returning the previous value of the reference.

use_query_state.ts

State hook for handling Router query.

Operates as a usual state hook, but sets/gets the value from the query instead.

2.4.1

1 year ago

2.4.0

1 year ago

2.4.14

1 year ago

2.4.3

1 year ago

2.4.5

1 year ago

2.4.10

1 year ago

2.4.7

1 year ago

2.4.9

1 year ago

2.4.8

1 year ago

2.4.15-1

1 year ago

2.4.15-0

1 year ago

2.3.1-0

1 year ago

2.3.1-1

1 year ago

2.3.0

2 years ago

2.2.1

2 years ago

2.1.2

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.2.2

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.8

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.4

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.1.2-beta.1

2 years ago