Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove tabs for quickstart setup code #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 35 additions & 20 deletions quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,75 @@ From the command line install the Overmind package:

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

```
npm install overmind overmind-react
```

{% endtab %}

{% tab title="Vue" %}

```
npm install overmind overmind-vue
```

{% endtab %}

{% tab title="Angular" %}

```text
npm install overmind overmind-angular
```

{% endtab %}
{% endtabs %}

### Setup

Now set up a simple application like this:

{% tabs %}
{% tab title="overmind/state.js" %}
**Application state**

This contains the initial state of the application.

```javascript
// overmind/state.js
export const state = {
title: 'My App'
}
title: "My App",
};
```
{% endtab %}

{% tab title="overmind/index.js" %}
```typescript
import { state } from './state'
**Application config**

This contains the sate, effects and actions. For now, we just
set the state.

```javascript
// overmind/index.js
import { state } from "./state";

export const config = {
state
}
state,
};
```
{% endtab %}

{% tab title="index.js" %}
```typescript
import { createOvermind } from 'overmind'
import { config } from './overmind'
**Create application**

This is where you boot your application by linking all the pieces together.

const overmind = createOvermind(config)
```javascript
// index.js
import { createOvermind } from "overmind";
import { config } from "./overmind";

const overmind = createOvermind(config);
// ... see below on how to link the overmind instance to specific view layers.
```
{% endtab %}
{% endtabs %}

And fire up your application in the browser or whatever environment your user interface is to be consumed in by the users.
And fire up your application in the browser or whatever environment your user
interface is to be consumed in by the users.

Move on with the specific view layer of choice to connect your app:

\*\*\*\*[**REACT** ](views/react.md)**-** [**ANGULAR**](views/angular.md) **-** [**VUE**](views/vue.md)\*\*\*\*