
์ธ์ด ๐ฐ๐ท ํ๊ตญ์ด
์์ํ๊ธฐ
์ฌ์ฉ๋ฒ
FastComments React Library
์ด๊ฒ์ FastComments์ ๊ณต์ React ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ๋๋ค.
React์ฉ FastComments ๋๊ธ ์์ ฏ
์ ์ฅ์
์์ 
examples ํด๋์์ ๋ค์ํ ์ฌ์ฉ ์ฌ๋ก(๋คํฌ ๋ชจ๋, ํ์ด์ง๋ค์ด์
๋ฑ)์ ๋ํ ์์ ๋ฅผ ์ฐพ์ ์ ์์ต๋๋ค. ๊ฐ ์์ ๋ npm install๋ก ์ค์ ํ๊ณ npm run start๋ก ์์ํ ์ ์์ต๋๋ค.
์ฌ์ฉ๋ฒ 
The Main Widget Component
FastCommentsCommentWidget ์ปดํฌ๋ํธ๋ ์ค์๊ฐ FastComments ๋๊ธ ์์ ฏ์ ํฌํจํฉ๋๋ค.
์๋์ "demo"๋ฅผ FastComments ๊ด๋ฆฌ ์์ญ์ ์ฌ๊ธฐ์ ์๋ "tenantId"๋ก ๋ฐ๊พธ์ญ์์ค.
์ด ์์ ฏ์ ๋ง์ ์ต์ ์ ์ง์ํฉ๋๋ค - src/index.tsx์ ์๋ FastCommentsCommentWidgetConfig๋ฅผ ์ฐธ์กฐํ์ญ์์ค.
import React, { Component } from 'react'
import {FastCommentsCommentWidget} from 'fastcomments-react'
class Example extends Component {
render() {
return <FastCommentsCommentWidget tenantId="demo" />
}
}
Updating The Current Page (For SPAs)
๋๊ธ ์ค๋ ๋๊ฐ ์ฐ๊ฒฐ๋ ํ์ด์ง/๊ฒ์๋ฌผ์ ์ ๋ฐ์ดํธํ๋ ค๋ฉด ๊ตฌ์ฑ ํ๋ผ๋ฏธํฐ "urlId"์ "url"์ ์ ๋ฐ์ดํธํด์ผ ํฉ๋๋ค. ์์ ์ ์ค๋ช ์ ์ฌ๊ธฐ๋ฅผ ์ฐธ์กฐํ์ธ์.
Account Region (ATTENTION: EU Customers)
EU์ ์๋ ๊ฒฝ์ฐ, ํด๋ผ์ด์ธํธ ์์ ฏ์ ๊ทํ์ ์ง์ญ์ ์๋ ค์ผ ํฉ๋๋ค. examples/example-eu๋ฅผ ์ฐธ์กฐํ์ญ์์ค;
๊ทธ๋ ์ง ์์ผ๋ฉด region์ ์ ์ํ ํ์๊ฐ ์์ต๋๋ค.
The Comment Count Widget
FastCommentsCommentCountWidget ์ปดํฌ๋ํธ๋ ์ค์๊ฐ FastComments ๋๊ธ ์ ์์ ฏ์ ํฌํจํฉ๋๋ค.
์๋์ "demo"๋ฅผ FastComments ๊ด๋ฆฌ ์์ญ์ ์ฌ๊ธฐ์ ์๋ "tenantId"๋ก ๋ฐ๊พธ์ญ์์ค.
์ง์๋๋ ๊ตฌ์ฑ ์ต์ ์ src/index.tsx์ FastCommentsCommentCountConfig๋ฅผ ์ฐธ์กฐํ์ญ์์ค.
import React, { Component } from 'react'
import {FastCommentsCommentCountWidget} from 'fastcomments-react'
class Example extends Component {
render() {
return <FastCommentsCommentCountWidget tenantId="demo" urlId="https://example.com/some-page-or-id" />
}
}
Native
FastComments์ ์์ ํ ๋ค์ดํฐ๋ธ ๊ตฌํ์ fastcomments-react-native-sdk๋ฅผ ์ฐธ์กฐํ์ญ์์ค.
์น๋ทฐ๋ฅผ ์ฌ์ฉํ๋ ์ด ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ React Native ๋ํผ๋ fastcomments-react-native๋ฅผ ์ฐธ์กฐํ์ญ์์ค.
๋์ ํ์ํ์ ๊ฐ์?
React ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ๊ด๋ จํ์ฌ ๋ฌธ์ ๊ฐ ๋ฐ์ํ๊ฑฐ๋ ์ง๋ฌธ์ด ์๋ ๊ฒฝ์ฐ, ๋ค์์ ์ด์ฉํด ์ฃผ์ธ์:
๊ธฐ์ฌ
๊ธฐ์ฌ๋ ํ์ํฉ๋๋ค! ๊ธฐ์ฌ ์ง์นจ์ GitHub ์ ์ฅ์๋ฅผ ๋ฐฉ๋ฌธํด ์ฃผ์ธ์.