Skip to content

Commit

Permalink
update the readme for npm (#1523)
Browse files Browse the repository at this point in the history
Co-authored-by: Moser José <[email protected]>
Co-authored-by: Wojciech Lewicki <[email protected]>
  • Loading branch information
3 people authored Jul 25, 2022
1 parent 211acf0 commit c84b345
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
Install the JavaScript with:

```bash
expo install react-native-svg
```
```bash
expo install react-native-svg
```

📚 See the [**Expo docs**](https://docs.expo.io/versions/latest/sdk/svg/) for more info or jump ahead to [Usage](#Usage).

Expand All @@ -77,10 +77,13 @@ Install the JavaScript with:
1. Install library

from npm

```bash
npm install react-native-svg
```

from yarn

```bash
yarn add react-native-svg
```
Expand Down Expand Up @@ -390,7 +393,7 @@ module.exports = (async () => {
babelTransformerPath: require.resolve('react-native-svg-transformer'),
},
resolver: {
assetExts: assetExts.filter(ext => ext !== 'svg'),
assetExts: assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],
},
};
Expand Down Expand Up @@ -1412,15 +1415,15 @@ import ReactDOMServer from 'react-dom/server';

const isWeb = Platform.OS === 'web';

const childToWeb = child => {
const childToWeb = (child) => {
const { type, props } = child;
const name = type && type.displayName;
const webName = name && name[0].toLowerCase() + name.slice(1);
const Tag = webName ? webName : type;
return <Tag {...props}>{toWeb(props.children)}</Tag>;
};

const toWeb = children => React.Children.map(children, childToWeb);
const toWeb = (children) => React.Children.map(children, childToWeb);

export default class App extends React.Component {
renderSvg() {
Expand Down

0 comments on commit c84b345

Please sign in to comment.