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
It would make life a lot easier if we could detect the type automatically, so all we have to do is supply the name of the variable we want to expose...
For replace type variables, we just need to check for them being used in the output.
For list type variables, we can check for the existance of a .map or some other type of loop
And for control type variables we can check their usage in JSX expression, and if they are used in the left side of the expression...
It probably won't be 100% reliable but feels like it could be quite effective...
An additional feature worth investigating would be to have variables that have multiple "types"...
Eg, a replace variable could also be a control variable, which is not currently supported (this is a rather contrived example):
<>{name===''&&'Unknown user'}{name!==''&&name}</>
The text was updated successfully, but these errors were encountered:
It would make life a lot easier if we could detect the type automatically, so all we have to do is supply the name of the variable we want to expose...
For
replace
type variables, we just need to check for them being used in the output.For
list
type variables, we can check for the existance of a.map
or some other type of loopAnd for
control
type variables we can check their usage in JSX expression, and if they are used in the left side of the expression...It probably won't be 100% reliable but feels like it could be quite effective...
An additional feature worth investigating would be to have variables that have multiple "types"...
Eg, a replace variable could also be a control variable, which is not currently supported (this is a rather contrived example):
The text was updated successfully, but these errors were encountered: