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
I want use JSS in my project demos, It's used as follows:
importReactfrom'react'import{createUseStyles}from'react-jss'constuseStyles=createUseStyles({box: {color: 'red'}})exportdefaultfunctionBox({ children }){constclasses=useStyles()return<divclassName={classes.box}>Hello</div>}
But currently React View does not support writing multiple statements.
First, we add a return before the first statement, and we will delete export default, and modify the variable declaration statement, leaving only the initial value part.
This will make the above demo code error.
I wonder if it is possible to simply replace the export default statement with a return statement. If there is no export default statement in the code, then convert the last statement to a return statement.
If you think this is feasible, then I can implement it and submit a pull request.
The text was updated successfully, but these errors were encountered:
I want use JSS in my project demos, It's used as follows:
But currently React View does not support writing multiple statements.
First, we add a
return
before the first statement, and we will deleteexport default
, and modify the variable declaration statement, leaving only the initial value part.This will make the above demo code error.
I wonder if it is possible to simply replace the export default statement with a return statement. If there is no export default statement in the code, then convert the last statement to a return statement.
If you think this is feasible, then I can implement it and submit a pull request.
The text was updated successfully, but these errors were encountered: