
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
react-native-html2native
Advanced tools
A component which takes HTML content and renders it as native views.
value
: a string of HTML content to renderonLinkPress
: a function which will be called with a url when a link is pressed.
Passing this prop will override how links are handled (defaults to calling Linking.openURL(url)
)stylesheet
: a stylesheet object keyed by tag name, which will override the
styles applied to those respective tags.renderNode
: a custom function to render HTML nodes however you see fit. If
the function returns undefined
(not null
), the default renderer will be
used for that node.import React, { Component } from 'react'
import ReactNative from 'react-native'
const { Text, View, ListView } = ReactNative
const HTMLView = require('react-native-html2native')
class App extends Component {
render() {
const content = '<p><a href="http://google.com">Google it FTW!</a></p>'
return (
<HTMLView
value={content}
stylesheet={styles}
/>
)
}
})
const styles = StyleSheet.create({
a: {
fontWeight: '300',
color: '#FF0000'
}
})
When a link is clicked, by default ReactNative.Linking.openURL
is called with the
link url. You can customise what happens when a link is clicked with onLinkPress
:
import React, { Component } from 'react'
import ReactNative from 'react-native'
class ContentView extends Component {
render() {
return (
<HTMLView
value={this.props.html}
onLinkPress={(url) => console.log('Link clicked: ', url)}
/>
)
}
})
FAQs
A component which renders HTML content as native views
The npm package react-native-html2native receives a total of 0 weekly downloads. As such, react-native-html2native popularity was classified as not popular.
We found that react-native-html2native demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.