Skip to content

Commit

Permalink
WIP state queue update
Browse files Browse the repository at this point in the history
  • Loading branch information
mofojed committed Dec 20, 2023
1 parent 10abaaa commit fd315c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/ui/src/deephaven/ui/hooks/use_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@


@overload
def use_state(initial_value: T) -> (T, Callable[[T], None]):
def use_state(initial_value: T) -> tuple[T, Callable[[T], None]]:
...


def use_state(initial_value: T | None = None) -> (T | None, Callable[[T], None]):
def use_state(initial_value: T | None = None) -> tuple[T | None, Callable[[T], None]]:
context = get_context()
hook_index = context.next_hook_index()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

logger = logging.getLogger(__name__)

# TODO: Get a thread from a thread pool here for rendering and callbacks?


class ElementMessageStream(MessageStream):
_manager: JSONRPCResponseManager
Expand Down

0 comments on commit fd315c6

Please sign in to comment.