0.0.3 • Published 4 years ago

react-native-im-feeling-ducky v0.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

react-native-im-feeling-ducky

A React Native <WebView /> which will navigate to the top result of your input string using DuckDuckGo!

🚀 Getting Started

Using npm:

npm install --save react-native-im-feeling-ducky

Using yarn:

yarn add react-native-im-feeling-ducky

✍️ Example

The <FeelingDucky /> component is just a wrapper around a WebView, whose component definition must be supplied by the caller. This is to ensure backwards compatibility with versions of React Native which depend upon the deprecated ReactNative.WebView component:

import React from 'react';
import WebView from 'react-native-webview';
import FeelingDucky from 'react-native-im-feeling-ducky';

export default () => (
  <FeelingDucky
    WebView={WebView}
    style={{
      flex: 1,
    }}
    searchTerm="cawfree mapsy"
  />
);

This will display the top result of the searchTerm when searched on Duck Duck Go.

✌️ License

MIT