RoactRodux.Connect - typeof 'X' is not assignable to type 'StatefulComponent<never>'

I have no idea how to solve this error. If you have an idea let me know. Here’s what the code looks like below.

import Roact, { setGlobalConfig } from "@rbxts/roact";

import RoactRodux, { ComponentType, connect } from "@rbxts/roact-rodux";

import { DispatchParam } from "@rbxts/rodux";

import { MyStore } from "client/Rodux/Store";

interface Props {

}

interface State {

}

class OriginalHorizontalScroll extends Roact.Component<Props, State> {

    constructor(state: State, props: Props) {

        super(props)

        this.setState(state)

    }

    render(): Roact.Element {

        return <imagelabel

            Key="HorizontallScroll"

            AnchorPoint={new Vector2(0.5, 0.5)}

            BackgroundTransparency={1}

            Position={new UDim2(0.502, 0, 0.801, 0)}

            ScaleType={Enum.ScaleType.Slice}

            Size={new UDim2(0.736, 0, 0.242, 0)}

            SliceCenter={new Rect(150, 150, 160, 160)}

        >

            <scrollingframe

                Active={true}

                AnchorPoint={new Vector2(0, 0.5)}

                BackgroundTransparency={1}

                BorderSizePixel={0}

                BottomImage={""}

                CanvasSize={new UDim2(2, 0, 0, 0)}

                Position={new UDim2(0.031, 0, 0.503, 0)}

                ScrollBarImageColor3={Color3.fromRGB(0, 0, 0)}

                ScrollingDirection={Enum.ScrollingDirection.X}

                Size={new UDim2(0.937, 0, 0.69, 0)}

                TopImage={""}

            >

                <uilistlayout

                    FillDirection={Enum.FillDirection.Horizontal}

                    Padding={new UDim(0, -10)}

                    SortOrder={Enum.SortOrder.LayoutOrder}

                    VerticalAlignment={Enum.VerticalAlignment.Center}

                />

            </scrollingframe>

        </imagelabel>

    }

}

export const HorizontallScroll = RoactRodux.connect()(OriginalHorizontalScroll)
2 Likes

Uhhh, this is the ROBLOX devforum, and that looks a whole lot more like C# code then Luau to me.

That’s Roact, the library for designing Roblox UI

1 Like