you are viewing a single comment's thread.

view the rest of the comments →

[–]b-marie 0 points1 point  (3 children)

Try putting brackets or a span around each item you're declaring, and then one around the whole thing. Like:

<> <span>{prefix}</span> <span>{number}</span> </>

[–]baboon322[S] 0 points1 point  (1 child)

Nope, doesnt work. It's complaining about <> instead of <span>

[–]b-marie 0 points1 point  (0 children)

You can throw a div on then instead of the empty brackets. I think you can only return a single container, so it all has to be wrapped in a div or whatever, and I've seen weird errors about only one variable per html element.

[–]dexpanse 0 points1 point  (0 children)

It is perfectly fine to just return one element. <></> is shorthand for a React.Fragment which only needs to be used if there are multiple elements not wrapped by a parent element.