-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Comment in JSX map breaks code silently #8726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Not only in map, it occurs more broadly in return statements. This is a major problem, and should be given high priority. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
Not stale, see other issues |
Update: see my comment here #8687 (comment) |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. |
Describe the bug
When mapping an array of objects to nodes in the JSX (render) part (React FC), I wanted to add a comment, which worked fine for CRA in dev mode and for the VS Code TS parser, but when building for production, the array content is not shown and there is no error.
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
N/A
Environment
Environment Info:
Steps to reproduce
create-react-app --template typescript bug
App.tsx
with:Expected behavior
The page should show "OK" in both development and production mode.
Actual behavior
The page shows "OK" in dev mode (
yarn start
) but not in production mode (yarn build && serve -s build
) (and it's not in the DOM either, and no runtime error).Reproducible demo
https://github.com/antoinerousseau/cra-ts-bug
https://cra-ts-bug.netlify.com/
Related
Edit: after checking again it might be similar to #8687 although I don't get any runtime error in my case.
It also happens in CRA 3.4.0.
The text was updated successfully, but these errors were encountered: