FastComments.com

Add Comment Widgets to Your React Native App

์ด๊ฒƒ์€ FastComments์˜ ๊ณต์‹ React Native ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ž…๋‹ˆ๋‹ค.

React Native์šฉ FastComments ๋Œ“๊ธ€ ์œ„์ ฏ

์ €์žฅ์†Œ

GitHub์—์„œ ๋ณด๊ธฐ


๋ผ์ด๋ธŒ ์‡ผ์ผ€์ด์Šค Internal Link


๊ณต์šฉ demo ํ…Œ๋„ŒํŠธ์— ๋Œ€ํ•ด ๋กœ์ปฌ์—์„œ ์‹คํ–‰๋˜๋Š” ๋ชจ๋“  ์œ„์ ฏ๊ณผ ํ”Œ๋กœ์šฐ๋ฅผ ๋ณด๋ ค๋ฉด, ์ €์žฅ์†Œ๋ฅผ ํด๋ก ํ•˜๊ณ  ๋‹ค์Œ์„ ์‹คํ–‰ํ•˜์„ธ์š”:

yarn bootstrap
cd example
yarn ios       # ๋˜๋Š”: yarn android, yarn web

The showcase entry point is example/src/ShowcaseApp.tsx โ€” a single app that exposes all widgets, themes, and flows.

The yarn web target uses react-native-web + react-native-web-webview (which renders the WebView as an iframe). Useful for quick visual smoke tests in a browser; native-only WebView APIs like injectJavaScript and onShouldStartLoadWithRequest won't fully behave on web.

์„ค์น˜ Internal Link

npm install react-native-webview --save
npm install fastcomments-react-native --save

๋„ค์ดํ‹ฐ๋ธŒ SDK ๊ณ ๋ คํ•˜๊ธฐ Internal Link


์ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” VanillaJS ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ๊ฐ์‹ธ๋Š” ์›น๋ทฐ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

FastComments๋Š” ์ด์ œ fastcomments-react-native-sdk์˜ ์ผ๋ถ€๋กœ ํด๋ผ์ด์–ธํŠธ์˜ ์™„์ „ํ•œ ๋„ค์ดํ‹ฐ๋ธŒ ๊ตฌํ˜„์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.

์™„์ „ํ•œ ๋„ค์ดํ‹ฐ๋ธŒ ๊ตฌํ˜„์„ ์›ํ•œ๋‹ค๋ฉด ๊ทธ๊ณณ์„ ํ™•์ธํ•ด ๋ณด์„ธ์š”.

์‚ฌ์šฉ๋ฒ• - SSO(์‹ฑ๊ธ€ ์‚ฌ์ธ์˜จ) Internal Link

FastComments๋Š” ๋ณด์•ˆ SSO์— HMAC์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ์‚ฌ์šฉํ•˜๋ ค๋ฉด, ๋ฐฑ์—”๋“œ์—์„œ SSO ๊ฐ์ฒด(sso ๊ตฌ์„ฑ ์†์„ฑ)๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ์ด๋ฅผ ๋Œ“๊ธ€ ์œ„์ ฏ์— ์ „๋‹ฌํ•˜์„ธ์š”.

๋‹ค์–‘ํ•œ ๋ฐฑ์—”๋“œ ์˜ˆ์ œ๋Š” ๋‹ค์Œ์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค: https://github.com/FastComments/fastcomments-code-examples/tree/master/sso

ํ”ผ์–ด ์˜์กด์„ฑ Internal Link

fastcomments-react-native๋Š” react-native-webview๋ฅผ ํ•„์š”๋กœ ํ•ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ react-native-webview์˜ ์„ค์น˜ ์ ˆ์ฐจ๋ฅผ ๋”ฐ๋ผ์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๊ณ„์ • ์ง€์—ญ (์ฃผ์˜: EU ๊ณ ๊ฐ)

๊ณ„์ •์ด EU์— ์žˆ๋Š” ๊ฒฝ์šฐ ์œ„์ ฏ ๊ตฌ์„ฑ์—์„œ region = 'eu'๋กœ ์„ค์ •ํ•˜์„ธ์š”. ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด region์„ ์ •์˜ํ•  ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.

์œ ์ง€๋ณด์ˆ˜ ์ƒํƒœ Internal Link

์ด ์ปดํฌ๋„ŒํŠธ๋“ค์€ ์šฐ๋ฆฌ์˜ ํ•ต์‹ฌ VanillaJS ์ปดํฌ๋„ŒํŠธ๋ฅผ ๊ฐ์‹ธ๋Š” ๋ž˜ํผ์ž…๋‹ˆ๋‹ค. ์ด ์ปดํฌ๋„ŒํŠธ๋“ค์€ ์ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ๋ฐฐํฌํ•˜์ง€ ์•Š๊ณ ๋„ ์ž๋™์œผ๋กœ ์—…๋ฐ์ดํŠธ(๋ฒ„๊ทธ ์ˆ˜์ •, ๊ธฐ๋Šฅ ์ถ”๊ฐ€)ํ•  ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ, ์ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ๋‹น๋ถ„๊ฐ„ ๊ณต๊ฐœ๋˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ๋‹ค๊ณ  ํ•ด์„œ FastComments๊ฐ€ ํ™œ๋ฐœํžˆ ๊ฐœ๋ฐœ๋˜๊ณ  ์žˆ์ง€ ์•Š๋‹ค๋Š” ๋œป์€ ์•„๋‹™๋‹ˆ๋‹ค! ์—…๋ฐ์ดํŠธ๋Š” ์šฐ๋ฆฌ ๋ธ”๋กœ๊ทธ์—์„œ ํ™•์ธํ•˜์„ธ์š”. ์ค‘๋Œ€ํ•œ API ๋ณ€๊ฒฝ์ด๋‚˜ ๊ธฐ๋Šฅ์€ ์ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ ๋ฒ„์ „์ด ์˜ฌ๋ ค์ง€์ง€ ์•Š๋Š” ํ•œ ๊ธฐ๋ฐ˜์ด ๋˜๋Š” ์ฝ”์–ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์—๋Š” ์ ˆ๋Œ€ ๋ฐ˜์˜๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.


๋„์›€์ด ํ•„์š”ํ•˜์‹ ๊ฐ€์š”?

React Native ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์—์„œ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•˜๊ฑฐ๋‚˜ ์งˆ๋ฌธ์ด ์žˆ๋Š” ๊ฒฝ์šฐ, ๋‹ค์Œ์„ ์ด์šฉํ•ด ์ฃผ์„ธ์š”:

๊ธฐ์—ฌํ•˜๊ธฐ

๊ธฐ์—ฌ๋ฅผ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค! ๊ธฐ์—ฌ ๊ฐ€์ด๋“œ๋Š” GitHub ์ €์žฅ์†Œ๋ฅผ ๋ฐฉ๋ฌธํ•ด ์ฃผ์„ธ์š”.