mirror of
https://github.com/littensy/charm.git
synced 2026-10-22 12:41:37 +00:00
refactor: use new type solver
This commit is contained in:
parent
748dbc5014
commit
22b440e35f
32 changed files with 169 additions and 155 deletions
|
|
@ -13,12 +13,13 @@ local function renderHook<Props, Result>(callback: (Props) -> Result, props: Pro
|
|||
|
||||
local function Component(props: Props)
|
||||
hook.result = callback(props)
|
||||
return nil
|
||||
end
|
||||
|
||||
function hook.rerender(newProps: Props?)
|
||||
props = newProps or props
|
||||
ReactRoblox.act(function()
|
||||
root:render(React.createElement(Component, props))
|
||||
root:render(React.createElement(Component, props) :: any)
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
local test = require("../../tests/test")
|
||||
|
||||
-- selene: allow(global_usage)
|
||||
_G.__ROACT_17_MOCK_SCHEDULER__ = true
|
||||
|
||||
test.describe("useSignalState", function()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue