This commit is contained in:
lx
2026-07-06 14:01:11 -04:00
commit c4f97d729d
16468 changed files with 935321 additions and 0 deletions
@@ -0,0 +1,25 @@
--[[
Small wrapper for RoactRodux's connect function that
additionally exposes the original, unconnected component
for testing
]]
local CorePackages = game:GetService("CorePackages")
local RoactRodux = require(CorePackages.RoactRodux)
local function connectToStore(mapStateToProps, mapDispatchToProps)
return function(innerComponent)
local connectedComponent = RoactRodux.UNSTABLE_connect2(
mapStateToProps,
mapDispatchToProps
)(innerComponent)
function connectedComponent.getUnconnected()
return innerComponent
end
return connectedComponent
end
end
return connectToStore