The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Access Web Pages through React Native's WebView Component

Access Web Pages through React Native's WebView Component

4:20
We can access web pages in our React Native application using the WebView component. We will connect the links in our repository component to their Github web page when a user click on them.
Watch this lesson now
Avatar
egghead.io

We can access web pages in our React Native application using the WebView component. We will connect the links in our repository component to their Github web page when a user click on them.

Avatar
Joe

This lesson could use some clean-up.

Using "WEBVIEW" then "WebView" in Repositories.js. Naming the component WebView.js which then exports "Web". It's a bit sloppy. One suggestion would be to rename all of them...

As of React Native v0.20 I'm getting this warning "url supplied to WebView has been deprecated. Use the source prop instead"

Changing from:

to:

solves the issue.

Avatar
Tyler

Thanks for the suggestion! Also, looks like your markdown didn't quite render properly...

In reply to Joe
Avatar
christopher

Can you post Markdown, for the Source Prop Correction?
Thanks

In reply to Tyler
Avatar
Marc Cámara

For future developers with this problem, you should use <WebView source={{uri: this.props.url}} /> as url is deprecated.

In reply to christopher
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?