ssorallen / turbo-react

A JavaScript library that transitions between static HTML pages on navigation; no app server required.
https://turbo-react.herokuapp.com/
Apache License 2.0
274 stars 16 forks source link

Breaks when using inline SVGs #13

Open olliekav opened 9 years ago

olliekav commented 9 years ago

My portfolio site uses quite a few SVGs inline, this breaks with the error...

Uncaught Error: Namespace attributes are not supported. ReactJSX is not XML.

I can get away with removing the namespace on the actual SVG itself, but I'm using

<a xlink:href="/">

To create a linkable logo.

Any way around this? Love the script!

ssorallen commented 9 years ago

I will take a look at a workaround for this. It's an intentional limitation of JSX from what I have found, and so it's not a bug from their point of view.

Is your portfolio site public? I'd love to see how you're using TurboReact.

olliekav commented 9 years ago

Okay, thanks for having a look. Just ironing out a few last bugs then I'll send you a link. On 16 Feb 2015 09:46, "Ross Allen" notifications@github.com wrote:

I will take a look at a workaround for this. It's an intentional limitation of JSX from what I have found, and so it's not a bug from their point of view.

Is your portfolio site public? I'd love to see how you're using TurboReact.

— Reply to this email directly or view it on GitHub https://github.com/ssorallen/turbo-react/issues/13#issuecomment-74449984 .

ssorallen commented 9 years ago

The React team is still considering how to properly handle SVGs: https://github.com/facebook/react/issues/1657

It might make sense to have a workaround in Reactize until React lands full SVG support, and so I will keep looking. I also want to make Reactize fall back to a full page load if it has any problems converting documents.

olliekav commented 9 years ago

Ok, no problem. I'll look at a work around for now. Cheers.