Skip to content

Commit

Permalink
Adds code hilighting to the readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Marquez committed Nov 29, 2018
1 parent a94355c commit 6356379
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ npm install --save react-interactable animated react-panresponder-web
With an interactable view you can make any component react to dragging events.

**Using it with react-native-web**
```
```js
// Import the libraries
import React from 'react'
import Interactable from 'react-interactable'
Expand All @@ -40,7 +40,7 @@ return (
```

If we want to use `react-native-interactable` for iOS and Android versions and `react-interactable` for the dom seamlessly, we can add an alias to our webpack.config.js and just use `import Interactable from "react-native-interactable"` as we are used to do:
```
```js
// Inside webpack.config.js
module.exports = {
//...
Expand All @@ -53,7 +53,7 @@ module.exports = {
```

**Using it with plain react (react-dom)**
```
```js
// Import the libraries, pay attention to require the no native version
import React from 'react'
import Interactable from 'react-interactable/noNative'
Expand Down

0 comments on commit 6356379

Please sign in to comment.