Skip to content

Commit ff44f56

Browse files
committed
docs(readme): add react native section into development topic
1 parent 9257c6d commit ff44f56

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

README.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SVG-Powered component to easily create placeholder loadings (like Facebo
99

1010
## Features
1111

12-
- :gear: **Customizable:** Feel free to change the colors, speed, sizes and even **RTL**;
12+
- :gear: **Customizable:** Feel free to change the colors, speed, sizes, and even **RTL**;
1313
- :ok_hand: **Plug and play:** with many presets to use, see the [examples](http://danilowoz.com/create-content-loader/#gallery);
1414
- :pencil2: **DIY:** use the [create-content-loader](https://danilowoz.com/create-content-loader) to create your own custom loaders easily;
1515
- 📱 **React Native support**: same API, as same powerful features;
@@ -207,7 +207,7 @@ const MyLoader = () => (
207207

208208
#### Responsive - Mobile version
209209

210-
In order to avoid unexpected behavior, the package doesn't have opinioned settings. So if it needs to be responsive, have in mind that the output of package is a regular SVG, so it just needs the same attributes to become a regular SVG responsive, which means:
210+
In order to avoid unexpected behavior, the package doesn't have opinioned settings. So if it needs to be responsive, have in mind that the output of the package is a regular SVG, so it just needs the same attributes to become a regular SVG responsive, which means:
211211

212212
```jsx
213213
import { Code } from 'react-content-loader'
@@ -257,15 +257,15 @@ When using `rgba` as a `backgroundColor` or `foregroundColor` value, [S
257257

258258
#### **Black box in Safari / iOS (again)**
259259

260-
Using the base tag on a page that contains SVG elements fails to render and it looks like a black box. Just remove the **base-href** tag from the `<head />` and issue solved.
260+
Using the base tag on a page that contains SVG elements fails to render and it looks like a black box. Just remove the **base-href** tag from the `<head />` and the issue has been solved.
261261

262262
<img width="350" src="https://user-images.githubusercontent.com/11562881/39406054-2f308de6-4bce-11e8-91fb-bbb35e29fc10.png" alt="black box" />
263263

264264
See: [#93](https://github.com/danilowoz/react-content-loader/issues/93) / [109](https://github.com/danilowoz/react-content-loader/issues/109)
265265

266266
#### Browser supports SVG-Animate
267267

268-
Old browser doesn't support animation in SVG ([compatibility list](https://caniuse.com/#search=SVGAnimateElement)), and if your project must support IE for examples, here's a couple of ways to make sure that browser supports SVG Animate:
268+
Old browsers don't support animation in SVG ([compatibility list](https://caniuse.com/#search=SVGAnimateElement)), and if your project must support IE, for examples, here's a couple of ways to make sure that browser supports SVG Animate:
269269

270270
- `window.SVGAnimateElement`
271271
- `document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#SVG-Animation", "1.1")`
@@ -282,7 +282,7 @@ Old browser doesn't support animation in SVG ([compatibility list](https://caniu
282282

283283
## Development
284284

285-
Fork the repo then clone it
285+
Fork the repo and then clone it
286286

287287
```
288288
$ git clone [email protected]:YourUsername/react-content-loader.git && cd react-content-loader
@@ -292,15 +292,24 @@ $ git clone [email protected]:YourUsername/react-content-loader.git && cd rea
292292

293293
`$ npm run build`: Build to production;
294294

295-
`$ npm run dev`: Run the docz to see your changes;
295+
`$ npm run dev`: Run the Storybook to see your changes;
296+
297+
`$ npm run deploy:docs`: Deploy Storybook to the Github pages;
296298

297299
`$ npm run test`: Run all tests: type checking, unit tests on web and native;
298300

299-
`$ yarn test:watch`: Watch unit tests;
301+
`$ npm run test:watch`: Watch unit tests;
302+
303+
### React Native
300304

301-
`$ yarn tsc`: Typescript checking;
305+
As React Native doesn't support symbolic links (to link the dependency to another folder) and as there is no playground to check your contributions (like storybook), this is recommended strategy to run the project locally:
302306

303-
`$ yarn tsc:watch`: Typescript checking with watching;
307+
1. Create a new React Native from scratch, either Metro or create-react-native-app;
308+
2. Install the dependency to your root project:
309+
`yarn add react-content-loader react-native-svg`
310+
3. Open the project just created and clone this repository there;
311+
4. Create your loading component and point the `react-content-loader` to the project just cloned, like:
312+
`import ContentLoader, { Rect, Circle } from './react-content-loader/native'`
304313

305314
### Commit messages
306315

0 commit comments

Comments
 (0)