turbosnake/_hooks.py
def use_callback(*args):
    """Hook that returns the same callable instance on consequent renders as long as it's dependencies do not change.

    This helps to avoid extra re-renders of nested components when a callback is passed to them as property.

    cb = use_callback(lambda x: ..., dep1, dep2)


    @use_callback
    def cb2(x):
        ...

    # WARNING: First dependency MUST NOT be a callable!
    @use_callback(dep,dep1)
    def cb3(x):
        ...
    """
    return use_function_hook(_CallbackHook, *args)
Hook that returns the same callable instance on consequent renders as long as it's dependencies do not change.

    This helps to avoid extra re-renders of nested components when a callback is passed to them as property.

    cb = use_callback(lambda x: ..., dep1, dep2)


    @use_callback
    def cb2(x):
        ...

    # WARNING: First dependency MUST NOT be a callable!
    @use_callback(dep,dep1)
    def cb3(x):
        ...
    
Hook that returns the same callable instance on consequent renders as long as it's dependencies do not change.
This helps to avoid extra re-renders of nested components when a callback is passed to them as property.

cb = use_callback(lambda x: ..., dep1, dep2)



First dependency MUST NOT be a callable.
Hook that returns the same callable instance on consequent renders as long as it ' s dependencies do not change . This helps to avoid extra re - renders of nested components when a callback is passed to them as property . cb = use_callback ( lambda x : ... dep1 dep2 ) First dependency MUST NOT be a callable .
def use_callback(*args):
    return use_function_hook(_CallbackHook, *args)
def use_callback ( * args ) : return use_function_hook ( _CallbackHook , * args )
Hook that returns the same callable instance on consequent renders as long as it's dependencies do not change.
Hook that returns the same callable instance on consequent renders as long as it ' s dependencies do not change .
"""Hook that returns the same callable instance on consequent renders as long as it's dependencies do not change.

    This helps to avoid extra re-renders of nested components when a callback is passed to them as property.

    cb = use_callback(lambda x: ..., dep1, dep2)


    @use_callback
    def cb2(x):
        ...

    # WARNING: First dependency MUST NOT be a callable!
    @use_callback(dep,dep1)
    def cb3(x):
        ...
    """