From b5022c3e91dbd07ecbf5d7f52ab408f9e4eb8386 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Thu, 11 Jun 2020 16:50:16 +0100 Subject: [PATCH] docs(readme): responsive section --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 7c70307..d32daf1 100755 --- a/README.md +++ b/README.md @@ -245,6 +245,23 @@ const MyLoader = () => ( ## Troubleshooting +#### Responsive - Mobile version + +In order to avoid unexpected behavior, the package doesn't have opinioned settings. So if it needs to be responsive, have in mind that the output of package is a regular SVG, so it just needs the same attributes to become a regular SVG responsive, which means: + +```jsx +import { Code } from 'react-content-loader' + +const MyCodeLoader = () => ( + +) +``` + #### Server-side rendering (SSR) - Match snapshot As the main component generates random values to match the id of the SVG element with background style, it can encounter unexpected errors and unmatching warning on render, once the random value of id will be generated twice, in case of SSR: server and client; or in case of snapshot test: on the first match and re-running the test.