#[CLOSED] ~~React component working on dev, but not build~~ React had issues with SVG

6 messages · Page 1 of 1 (latest)

desert linden
#

After building my site with some updates (serving with Flask, in case it could be relevant) I'm getting this error Error: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=object&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings. Which decodes to ```js
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Been googling and searching on the server for quite some time now, and the info I've found were mostly (un)named imports/exports on StackOverflow, but doesn't seem to be my case

Guessing these lines could be the issue: ```js
className={ `${active && "bg-palette-select text-white" } block w-full text-left px-4 py-2 text-sm cursor-pointer` }
``` But I adapted the code from a very recent repo which works, and can't spot any relevant difference 🤔

Code: <https://github.com/elpekenin/astro-web/>(`NavMenu.jsx` is the component)
wise python
#

Maybe someone from the core team who has worked on the react integration can comment on this issue.

wise python
desert linden
#

Thx for your breakdown, I thought it was the entire component not working correctly because it didn't render anything
Will make a Header.astro, and use the SVGs there, as i did with social media, that should work 🙂

desert linden
#

Update to close the topic, rendering the SVG on Astro did indeed work (as the social media ones), no clue why React wouldn't work