mirror of
https://github.com/littensy/charm.git
synced 2026-10-23 13:54:07 +00:00
revert: build: remove project json files (#46)
This commit is contained in:
parent
990d71cd5b
commit
d7a1f62c3c
49 changed files with 97 additions and 92 deletions
15
packages/react/src/index.d.ts
vendored
Normal file
15
packages/react/src/index.d.ts
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { Selector } from "@rbxts/charm";
|
||||
|
||||
/**
|
||||
* A hook that subscribes to changes in the given atom or selector. The
|
||||
* component is re-rendered whenever the state changes.
|
||||
*
|
||||
* If the `dependencies` array is provided, the subscription to the atom or
|
||||
* selector is re-created whenever the dependencies change. Otherwise, the
|
||||
* subscription is created once when the component is mounted.
|
||||
*
|
||||
* @param callback The atom or selector to subscribe to.
|
||||
* @param dependencies An array of values that the subscription depends on.
|
||||
* @returns The current state.
|
||||
*/
|
||||
export function useAtom<State>(callback: Selector<State>, dependencies?: unknown[]): State;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
local Charm = require(script.Parent.Parent.charm)
|
||||
local React = if script.Parent.Parent:FindFirstChild("React")
|
||||
then require(script.Parent.Parent.React)
|
||||
else require((script.Parent.Parent :: any).react) :: never
|
||||
local Charm = require(script.Parent.Charm)
|
||||
local React = if script.Parent:FindFirstChild("react")
|
||||
then require(script.Parent.react) :: never
|
||||
else require(script.Parent.React)
|
||||
|
||||
--[=[
|
||||
A hook that subscribes to changes in the given atom or selector. The
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue