# Introduction

![](https://932471912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MF6zN1P64C9htwOiwl0%2Fuploads%2FaRSv2PwAVcMJJSkKFDA7%2Freactive_logo_white_bg.svg?alt=media\&token=ae8ddab9-df96-4a10-a472-a3ae3f48cd7c)

## Getting Started

**Reactive** aims to provide concise, intuitive way of writing react applications with high performance, embracing a reactivity system and mutations. By taking advantage of reactivity, it also introduces a new way of creating functional components addressing many of the mental complexity brought by functional components with hooks api.

That means no useEffect, no useMemo/useCallback no useState and no redundant repeated renders!!

**Reactive** is based on a reactivity system. It tracks mutations on a reactive data, making sure only necessary components are re rendered, which eventually leads to a highly optimized application out of the box without worrying about pure components, memoization or immutability.

**Reactive** also introduces a new but familiar way of defining components ([component](https://kutlugsahin.gitbook.io/re-active/reactive-components/component)) heavily inspired by Vue 3 composition API. As a matter of fact, reactivity system is based on [@vue/reactivity](https://v3.vuejs.org/api/basic-reactivity.html) package which is a very light library powering Vue3. It's also standalone and completely decoupled with Vue.js.

### Installation

```javascript
npm i @re-active/react
```

### Example

```tsx
import { computed, component, reactive } from '@re-active/react';

export const UserCard = component(() => {
  const user = reactive({
    name: 'John',
    lastName: 'Doe',
  });

  const fullName = computed(() => `${user.name} ${user.lastName}`);

  return () => (
    <div>
      <h2>Welcome {fullName.value} !</h2>
      <label>
        Name:
        <input
          value={user.name}
          onChange={(e) => (user.name = e.target.value)}
        />
      </label>
      <label>
        LastName:
        <input
          value={user.lastName}
          onChange={(e) => (user.lastName = e.target.value)}
        />
      </label>
    </div>
  );
});
```


---

# 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://kutlugsahin.gitbook.io/re-active/master.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.
