# Overview

<figure><img src="/files/ZPVNjsRLl38nNZudCKss" alt="MV-Components Logo"><figcaption></figcaption></figure>

A MV-Component is a powerful way to write reusable components for your Masonite applications. It provides code reusability and also testability in ways native views just does not allow. A MV-Component is typically comprised of a view file and a python class file.&#x20;

### Why use MV-Components

#### Reusability

The same MV-Component can be used in various parts of an application without needing to rewrite the same code.&#x20;

#### Single Responsibility

Allows complex logic to be stored along with the component that it belongs to instead of scattered across your codebase.

#### Readability

Makes it easier to reason about the behavior in your templates.&#x20;

### Inspirations

This project is inspired by several projects&#x20;

* ViewComponent (Ruby on Rails)
* Blade Components (Laravel)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bayside.gitbook.io/mv-components/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
