React-native 读取md 文件

put your file in assets folder and then fetch using react-native-fetch-blob package

RNFetchBlob.fs.readStream(RNFetchBlob.fs.asset('test.md'), 'utf8')

.then((stream) => {

  let data = '';

  stream.open();

  stream.onData((chunk) => {

    data += chunk;

  });

  stream.onEnd(() => {

    this.setState({

      data,

    });

  });

});

你可能感兴趣的:(React-native 读取md 文件)