0

What is the best/easiest way to create new react-native-app using react-native-0.59.9 or lower?

Trying to use https://github.com/futurepress/epubjs-rn , which only runs in react-native 0.59 or lower. The example app in https://github.com/futurepress/epubjs-rn/EpubReader does not work out of the box.

Lydon Ch
  • 8,637
  • 20
  • 79
  • 132

2 Answers2

1

please use epubjs-rn-62

usage To use the components in your own app install via npm or yarn

npm install --save epubjs-rn


import { Epub } from 'epubjs-rn';

Then you can add the reader element in your code:

<Epub src={"https://s3.amazonaws.com/epubjs/books/moby-dick/OPS/package.opf"}
      flow={"paginated"} />
atline
  • 28,355
  • 16
  • 77
  • 113
0

In order to start a new project with a specific React Native version, you can use the --version

react-native init ProjectName --version="0.59.9"

Check official documentation for more information.

EDIT

But in order to run an older version, you need to downgrade your React Native CLI version according to Compatibility of React Native CLI.

If you have already installed a version of react-native CLI, uninstall it using

npm uninstall -g react-native-cli

Then you have to install an older version as below,

npm install react-native-cli@1.0.0

Hope this will help you.

SDushan
  • 4,341
  • 2
  • 16
  • 34
  • Does not work because cannot successfully run react-native that supports version 0.59.9, because only react-native-cli version 1.xxx supports it. Therefore only 0.60.0 works fine with the above. refer to https://github.com/react-native-community/cli#compatibility The problem is I cannot install react-native-community/cli v1.xxx successfully. Could you please try @SDushan? and try to deploy to android. – Lydon Ch Dec 29 '19 at 12:59
  • @DonCh I have changed my answer. let me know if it didn't work. – SDushan Dec 29 '19 at 18:15