티스토리 수익 글 보기

티스토리 수익 글 보기

> For the complete documentation index, see [llms.txt](https://docs.reflag.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reflag.com/welcome/readme.md). # Getting started **Welcome!** Let’s get started. We’ll do the following: 1. Create your first flag. 2. Install the Reflag SDK. 3. Set flag access rules and/or remote config. 4. Enable Toolbar for local testing 5. Monitor your flag launch. ## 1. Create your first flag Now let’s create your first flag. {% tabs %} {% tab title=”CLI” %} “` npx @reflag/cli new “` See [CLI docs](/api/cli.md). {% endtab %} {% tab title=”UI” %} 1. [Sign up](https://app.reflag.com/) in the app 2. Click `New flag` in the sidebar. 3. Give your flag a name, and we’ll suggest a `flag key`.
{% endtab %} {% tab title=”MCP” %} You can create flags from your code editor via our [MCP](/api/mcp.md). {% endtab %} {% tab title=”Linear” %} You can create flags from within Linear by mentioning the `@reflag` [agent](/integrations/linear.md). {% endtab %} {% endtabs %} Next, let’s set up a Reflag SDK for your language and framework. ## 2. Install the Reflag SDK Find the supported languages below:
Reactreact.svgReact SDK
React Nativereact.svgReact Native SDK (beta)
Vue.jsvue-logo.svgVue SDK (beta)
Client-sidets-js.svgBrowser SDK
Server-sidenode-js.svgNode.js SDK
Next.jsnext-js.svgNext.js
Reflag supports OpenFeatureopenfeature.svgOpenFeature
Don’t use these languages or frameworks? Use our APIapi.svgRuntime API
### Code example for React If you’ve installed the React SDK and created a flag called `my-new-flag`, getting started looks like this: “`jsx import { useFlag } from “@reflag/react-sdk”; const MyFlag = () => { const { isEnabled } = useFlag(“my-new-flag”); return isEnabled ? “You have access!” : null; }; “` You can now use `isEnabled` to gate access to the flag. ## 3. Set access rules Head back to [your dashboard](https://app.reflag.com/), select your flag, and open the `Access` tab.
From here, you can define segments, companies, and users that will access your flag. ## 4. Enable Toolbar for local testing In the frontend SDK, enable the Toolbar to toggle flags locally.
In the React SDK, you enable it with `toolbar:` “`jsx “` ## 5. Monitor your flag launch On the Monitor tab, you can track real-time flag exposure, adoption, and user feedback.
### Track exposure The Exposed chart shows companies that have been exposed to your flag. This means they were checked for flag access against your targeting rules and the check returned `enabled`. ### Track adoption To track whether exposed companies are also interacting with your flag, use `track`. See the code example below. ### Get user feedback To get feedback from your users, you can add a [static “Feedback” button](/product-handbook/launch-monitor.md#static-feedback-button) or you can [trigger a survey](/product-handbook/launch-monitor/automated-feedback-surveys.md), at the right time. Here’s an example with a static feedback button. “`tsx import { useFlag } from “@reflag/react-sdk”; const MyFlag = () => { const { isEnabled, track, requestFeedback } = useFlag(“my-new-flag”); if (!isEnabled) { return null; } return ( <> ); } “` ## Get support * Need some help? [Chat with us](mailto:hello@reflag.com) * Latest product updates? [See Changelog](https://reflag.com/changelog) * Create account: [Sign up](https://app.reflag.com/) — # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter: “` GET https://docs.reflag.com/welcome/readme.md?ask=&goal= “` `ask` is the immediate question: it should be specific, self-contained, and written in natural language. `goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.