# Create React App

#### Install the dependencies

Using mosaic requires two packages in your create-react-app project - the start script package and the runtime package.

{% tabs %}
{% tab title="yarn" %}

```javascript
yarn add @tilework/mosaic-cra-scripts @tilework/mosaic
```

{% endtab %}

{% tab title="npm" %}

```javascript
npm install @tilework/mosaic-nextjs-scripts @tilework/mosaic
```

{% endtab %}
{% endtabs %}

#### Use the new scripts

Replace `react-scripts` invocations in the `scripts` block of your package.json. Such way, the build process will be launched with additional configurations (Webpack and Babel) required for Mosaic.

{% code title="package.json" %}

```javascript
{
    "scripts": {
        "start": "cra-scripts start",
        "build": "cra-scripts build",    
        "test": "cra-scripts test",      
        "link": "cra-scripts link"
    }
}
```

{% endcode %}


---

# 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://docs.mosaic.js.org/getting-started/create-react-app.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.
