-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat: add web implementation SvgXml and others component #2382
Conversation
…es. Consider refactoring to remove the need for a cycle.
…rt in ReactNativeSvg
…ftware-mansion/react-native-svg into @bohdanprog/fix-problem-with-svgxml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments, please answer them
const uri = getUriFromSource(source); | ||
if (isUriAnAndroidResourceIdentifier(uri)) { | ||
if (uri && isUriAnAndroidResourceIdentifier(uri)) { | ||
return loadAndroidRawResource(uri); | ||
} else { | ||
return fetchText(uri); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there's no URI, fetchText
should be executed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, when I updated the getUriFromSource function, it is required to add a check on line 43 to ensure that the URI exists for some reason.
if (!uri) { | ||
return null; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should check for that earlier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it's better to check the URI only in that specific place, especially if we have multiple areas where we utilize that function.
…nto @bohdanprog/fix-problem-with-svgxml
Summary
We want to make available SvgXml and other components in the web platform.
Test Plan
We can easily check how that works by opening
Test1813
.Compatibility