Hi,
Use
import { CharacterCounterContainerProps } from "../typings/CharacterCounterProps";
instead of `CharacterCounterPreviewProps` as it is deprecated.
So your CharacterCounter.tsx should look like this:
Great answer. Mendix must have noticed at some point and updated the copy/paste code section to this:
import { CharacterCounterContainerProps } from "../typings/CharacterCounterProps"; import "./ui/CharacterCounter.css"; export function CharacterCounter({ content }: CharacterCounterPreviewProps): ReactElement { const [currentInput, setCurrentInput] = useState<string>("");
Which is even worse, as it mixes the non-preview and preview props, so errors out with another message...
As above, remove the "Preview" bit from the CharacterCounterPreviewProps...