react-feather
react-feather copied to clipboard
Universal Support
Added svgs to support both react
and react-native
.
The svgs module is compatibility layer between react-native-svg and regular react (browser) based SVG elements. This allows you to write SVG in the react and react-native using exactly the same API. Bringing your applications a step closer to writing fully isomorphic application.

fixes:
- #15
- #42
- #47
Stays the same for users
Nothing changes in how users use the library. Behind the scenes svgs
detects if the environment is run for web or native.
How svgs
works
On web, most components are just renamed to conform with react-native-svg
exports, here:
function ClipPath(props) {
return <clipPath { ...prepare(props) } />;
}
on native, it exports react-native-svg
, here:
import RNSvg, {
ClipPath,
...
} from 'react-native-svg';
export {
ClipPath,
...
};
export default Svg;
This is working perfectly on react-native. Can someone review and merge? Thank you btw, saved my day.
How's the state of this getting merged?
Just stumbled across this, sounds promising - any update on the merge conflict in package.json
?
time goes fast - do it 🗡️