---
title: "Discussion on \"Next.js gotcha using body class name\" | Hashnode"
description: "Discussion on \"Next.js gotcha using body class name\". the code I was trying to reuse was adding a class \"filtering\" to document body with the logic that a filter box appears when this class is set\nfunction openFilters() {\n    document.body.classList.add('filtering');\nthe problem I encountered resulted f..."
url: "https://hashnode.com/posts/nextjs-gotcha-using-body-class-name/615ec5bc8e8734462af5c524"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Next.js gotcha using body class name](https://jeffmuc.hashnode.dev/nextjs-gotcha-using-body-class-name?utm_source=hashnode&utm_medium=feed)

the code I was trying to reuse was adding a class "filtering" to document body with the logic that a filter box appears when this class is set function openFilters() { document.body.classList.add('filtering'); the problem I encountered resulted f...

Oct 7, 2021 · 1 min read · jeffmuc.hashnode.dev  
Read the article

-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#css-modules](https://hashnode.com/tag/css-modules)

## Written by

[Jewgenij "Jeff" Steinhart](https://hashnode.com/@jeffstei)

@jeffstei · Munich

  
[View profile](https://hashnode.com/@jeffstei)

React and Flutter Dev in Munich

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
