---
title: "Discussion on \"Develop and Test a UI component using React with Vitest\" | Hashnode"
description: "Discussion on \"Develop and Test a UI component using React with Vitest\". What we are going to build\nIn this post, we are going to build an accordion with React and then test it with Vitest.\nThis is how it looks like ⬇️\n\nRepos\nYou can access the code for this example here:\n\nCodeSandbox: https://codesandbox.io/p/sandbox/acc..."
url: "https://hashnode.com/posts/develop-and-test-a-ui-component-using-react-with-vitest/6442776611953718421eaf01"
---

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

Discussion

# [Develop and Test a UI component using React with Vitest](https://elenamarinaki.hashnode.dev/develop-and-test-a-ui-component-using-react-with-vitest?utm_source=hashnode&utm_medium=feed)

What we are going to build In this post, we are going to build an accordion with React and then test it with Vitest. This is how it looks like ⬇️ Repos You can access the code for this example here: CodeSandbox: https://codesandbox.io/p/sandbox/acc...

Apr 21, 2023 · 16 min read · elenamarinaki.hashnode.dev  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#unit-testing](https://hashnode.com/tag/unit-testing)
-   [#testing-library](https://hashnode.com/tag/testing-library)
-   [#vitest](https://hashnode.com/tag/vitest)
-   [#ui](https://hashnode.com/tag/ui)

## Written by

[Elena Marinaki](https://hashnode.com/@elenamarinaki)

@elenamarinaki · London, UK

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

Hello 👋 just another person who likes building things :)

Full-stack web developer :)

## Responses 2

Markdown supported · ⌘↵ to post

[Ganesh Chikhalikar](https://hashnode.com/@gansoft)

[May 1, 2023](https://hashnode.com/posts/develop-and-test-a-ui-component-using-react-with-vitest/6442776611953718421eaf01/comment/644f670e90a163c76482199c)

Thanks for the detailed artical

[Simone Aiello](https://hashnode.com/@dandelionsam)

[Apr 25, 2023](https://hashnode.com/posts/develop-and-test-a-ui-component-using-react-with-vitest/6442776611953718421eaf01/comment/6447b1aea0ebe4540f921a1a)

Thanks for your detail explanation! I will surely use Vitest for my new project 😁

Also the icon theme is top: what’s the name?

[Elena Marinaki](https://hashnode.com/@elenamarinaki)

[Apr 25, 2023](https://hashnode.com/posts/develop-and-test-a-ui-component-using-react-with-vitest/6442776611953718421eaf01/comment/6447b1aea0ebe4540f921a1a#reply-6447dacc73f3c95ec8ed6398)

Thank you, Simone :) You mean the folders and file icons? These come from CodeSandbox editor ;)
