triplex icon indicating copy to clipboard operation
triplex copied to clipboard

Components declared with React.FC don't have their default props expressed through the editor UI

Open itsdouges opened this issue 2 years ago • 2 comments

With the latest feature coming for default props being shown in the editor there is one edge case that isn't handled — components declared with React.FC won't have their default props shown when the element is "active".

Provider controls / component controls work as expected with React.FC components.

Find the test in https://github.com/pmndrs/triplex/blob/main/packages/@triplex/server/src/ast/tests/type-infer.test.ts there is a todo in there. Make them all pass. Run 'pnpm test packages/@triplex/server/src/ast/tests/type-infer.test.ts' to see your changes

itsdouges avatar Jan 09 '24 08:01 itsdouges

Contemplating closing this as noone is running into this. For now I'll leave it open. Comment if you'd like this fixed!

itsdouges avatar Jul 17 '25 01:07 itsdouges

This will only be picked up if there is enough community need for it. If this affects you give the OP a 👍

itsdouges avatar Jul 23 '25 23:07 itsdouges