Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bang9/react-native-kakao-link-js
kakao links for react native without native dependency (except webview!)
https://github.com/bang9/react-native-kakao-link-js
kakao kakao-link kakao-scheme kakao-share react-native react-native-kakao react-native-kakao-link react-native-kakao-share
Last synced: 10 days ago
JSON representation
kakao links for react native without native dependency (except webview!)
- Host: GitHub
- URL: https://github.com/bang9/react-native-kakao-link-js
- Owner: bang9
- Created: 2020-09-09T18:00:44.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-09T20:34:20.000Z (about 4 years ago)
- Last Synced: 2024-04-24T16:24:21.301Z (7 months ago)
- Topics: kakao, kakao-link, kakao-scheme, kakao-share, react-native, react-native-kakao, react-native-kakao-link, react-native-kakao-share
- Language: TypeScript
- Homepage:
- Size: 10.7 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-native-kakao-link-js
- 네이티브 의존성 없이, 카카오 링크를 사용하기 위한 모듈입니다. (웹뷰를 통해 자바스크립트 SDK 를 사용합니다.)
- kakao link for react native without native dependency (except webview!)### Installation
1. `yarn add react-native-kakao-link-js`
2-1. `yarn add react-native-webview`
2-2. `cd ios && pod install` or `npx pod-install`
### Feature
- [sendDefault](https://developers.kakao.com/sdk/reference/js/release/Kakao.Link.html#.sendDefault)
- [sendCustom](https://developers.kakao.com/sdk/reference/js/release/Kakao.Link.html#.sendCustom)### Props
- whitelistedDomain(필수): 카카오 앱에 등록된 도메인
- webKakaoKey(필수): 웹용 카카오 앱 키
- onShareFailure(옵션): 카카오 링크 동작에 실패한 경우 트리거됩니다.### Example
```tsx
const ShareButton = () => {
const kakaoLink = React.useRef();
const shareKakao = () => {
kakaoLink.current?.sendCustom({
templateId: 12345,
templateArgs: {
title: "your custom arguments",
body: "your custom arguments"
}
});
};
const onShareFailure = () => {
// 카카오톡 설치가 안된 경우
Alert.alert("알림", "카카오 공유하기에 실패했습니다.");
};return (
Share
);
};
```