millions-author-34878
07/31/2023, 5:01 PMimport { getServicosHome } from "../api/areas";
import { useFeatureIsOn, useFeatureValue } from "@growthbook/growthbook-react";
import { useExperiment } from "@growthbook/growthbook-react";
/.../
const newButtonColor = useFeatureIsOn("buttonColor");
// const buttonColor = useFeatureValue("buttonColor", "blue");
const { value } = useExperiment({
key: "buttoncolor",
variations: ["blue", "red"],
});
/.../
{newButtonColor ? (
<p style={{ background: "red" }}>VERMELHO</p>
) : (
<p style={{ background: "blue" }}>AZUL</p>
)}