add gs
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user