You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
I'm trying to make a button, but I'm getting this error: Roact.createReconciler:408: attempt to call missing method '__mount' of table. What am I doing wrong? Thanks.
My code:
local Flat = Roact.createElement("ExtendedButton")
function Flat:init()
self.ref = Roact.createRef()
end
function Flat:render()
local children = self.props.children
return Roact.createElement("TextButton", {
AutoButtonColor = false,
Text = "",
AutomaticSize = Enum.AutomaticSize.X,
[Roact.Ref] = self.ref,
BackgroundColor3 = Theme.colorScheme.primary,
BorderSizePixel = 0,
[Roact.Event.MouseButton1Click] = self.props.onClick or function() end
}, {
children,
Roact.createElement(Ripple, {
cornerRadius = UDim.new(0, 8)
}),
Roact.createElement("UICorner", {
CornerRadius = UDim.new(0, 8)
})
})
end
function Flat:didMount()
self.ref:getValue().Size = UDim2.fromOffset(self.ref:getValue().AbsoluteSize.X+80, 40)
self.ref:getValue().AutomaticSize = false
end
In another script:
Roact.mount(
Roact.createElement(Flat, {
children = Button.Text("Hey")
}),
script.Parent.Parent.Tree
)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to make a button, but I'm getting this error:
Roact.createReconciler:408: attempt to call missing method '__mount' of table
. What am I doing wrong? Thanks.My code:
In another script:
The text was updated successfully, but these errors were encountered: