From c4035353a09210b64c93adce4167a94e5c3ef729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Tue, 9 Nov 2021 14:21:07 +0100 Subject: [PATCH] docs: add syntax highlighting to react-sdk --- website/docs/sdks/proxy-react.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/docs/sdks/proxy-react.md b/website/docs/sdks/proxy-react.md index 31557d635b..7954c13327 100644 --- a/website/docs/sdks/proxy-react.md +++ b/website/docs/sdks/proxy-react.md @@ -15,7 +15,7 @@ yarn add @unleash/proxy-client-react Import the provider like this in your entrypoint file (typically index.js/ts): -``` +```js import FlagProvider from '@unleash/proxy-client-react'; const config = { @@ -38,7 +38,7 @@ ReactDOM.render( To check if a feature is enabled: -``` +```js import { useFlag } from '@unleash/proxy-client-react'; const TestComponent = () => { @@ -55,7 +55,7 @@ export default TestComponent; To check variants: -``` +```js import { useVariant } from '@unleash/proxy-client-react'; const TestComponent = () => { @@ -76,7 +76,7 @@ export default TestComponent; Follow the following steps in order to update the unleash context: -``` +```js import { useUnleashContext, useFlag } from '@unleash/proxy-client-react' const MyComponent = ({ userId }) => {