-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Implement SVG tree renderer #285
base: master
Are you sure you want to change the base?
Implement SVG tree renderer #285
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/react-figma/react-figma/3b84goay8 |
I've got it working and added an example; however, the Yoga layout is broken in |
That looks promising. 🙌 I will try to fix the Yoga issue later. Also, re-hydration crashed at |
👍 thanks! I think it would be ideal if people could download examples without cloning the repo (as you can with Example README: ## Getting Started
Download the example or clone the repo:
```sh
curl https://codeload.github.com/react-figma/react-figma/tar.gz/master | tar -xz --strip=2 react-figma-master/examples/basic-svg
cd basic-svg
``
Install the dependencies:
```sh
npm i react@16 react-figma
npm i --save-dev webpack webpack-cli
`` |
How to help on ? This feature is so important. |
@thierryc |
fixes #154
Ended up carrying on the effort from #182 and working inside
react-reconciler
, my idea of rendering the markup to a string was a bad idea 😄.I've escaped some of the typing, will get it done once it's working fully first.
I need to create an svg example too.I've created abasic-svg
example.I would migrate the existing
<Svg>
component to an<SvgXml>
component (same API asreact-native-svg
), and have<Svg>
as an<Svg><Svg.*>
component only, with no xml string input. Any thoughts on this?If happy with this, I can work on a migration strategy for this (remove the
<Svg source=""
usage from the docs, and if thesource
prop is detected, return<SvgXml xml={props.source}
to keep the API working, and this backwards compatibility could be dropped for a major version, e.g.1.0
. Else can leave as is 🙂.Demo