Skip to content

synpixel/fusion-reflex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fusion Reflex

A port of react-reflex for Fusion 0.3

Installing

Pesde

pesde add synpixel/fusion_reflex

Example

local scope = Fusion:scoped(FusionReflex, { Producer = producer })

local count = scope:Selector(function(state)
	return state.count
end)

scope:New "TextButton" {
	Text = scope:Computed(function(use)
		return `Count: {use(count)}`
	end),
	AnchorPoint = Vector2.new(0.5, 0.5),
	Size = UDim2.new(0, 100, 0, 50),
	Position = UDim2.new(0.5, 0, 0.5, 0),
	Parent = playerGui,

	[Fusion.OnEvent "MouseButton1Click"] = function()
		scope.Producer.increment()
	end,

	[Fusion.OnEvent "MouseButton2Click"] = function()
		scope.Producer.decrement()
	end,
}

About

A port of react-reflex for Fusion 0.3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages