RN跳转详情页面,用HTML显示

import React, { Component } from "react";

import { View, Text, ScrollView, Dimensions } from "react-native";

import HTML from "react-native-render-html";

export default class Detils extends Component {


//标题

  static navigationOptions = ({ navigation }) => {

    return {

      title: navigation.getParam("name").title

    };

  };

  constructor(props) {

    super(props);

    this.state = {

      content: this.props.navigation.getParam("name").content

    };

  }

  render() {

    return (

     

       

          html={this.state.content}

          imagesMaxWidth={Dimensions.get("window").width}

        />

     

    );

  }

}

你可能感兴趣的:(RN跳转详情页面,用HTML显示)