Neo.mjs classes are standard JavaSript classes. Every source file
you write will be a class definition, extending some Neo.mjs
class.

<pre class="neo">
import Base from '../../../node_modules/neo.mjs/src/core/Base.mjs';

class Mammal extends Base {
    static config = {
        className: 'Simple.example.Mammal'
    }
}

const myMammal = Neo.create(Mammal);

Neo.setupClass(Mammal); // Where Neo.mjs initialializes the class config. 
export default Mammal;        // Makes the class available elsewhere.
</pre>

In the example above, we're extending the Neo.mjs base class. The static
config block describes the class we're defining. 

All classes specify the `className`; you'll add other config properties to describe the class.

The `const myMammal = Neo.create(Mammal);` statement creates an instance of
our class. For the sake of our discussion we're putting that statement in the same source
file where the class is defined, but normally your code would import the class elsewhere, 
and create instances as needed.

Let's add a `name` propery to the class.

<pre class="neo" style="color:gray">
import Base from '../../../node_modules/neo.mjs/src/core/Base.mjs';

class Mammal extends Base {
    static config = {
        className: 'Simple.example.Mammal',

        <span style="color:#b91010">name: 'Anonymous'</span>
    }
}

const myMammal = Neo.create(Mammal);
console.log(<span style="color:#b91010">myMammal.name</span>);           // Logs "Anonymous"
<span style="color:#b91010">myMammal.name</span> = 'Herbert';
console.log(<span style="color:#b91010">myMammal.name</span>);           // Logs "Herbert"

Neo.setupClass(Mammal);

export default Mammal;
</pre>

In Neo.mjs, instance properties are usually added in the `static config` block.
The `static config` block does two things: 
- It formally describes the properties API for your class.
- It lets Neo.mjs manage the initialization and lifecycle of those properties.

Think of the `static config` block as "these are the properties
that can be set as instances are created." Config properties can be introduced 
anywhere in the class hierarchy. 

Since our class defines a `name` property, we can specify that when creating
the instance, using the second argument to the `create` method. 

<pre class="neo" style="color:gray">
const myMammal = Neo.create(Mammal, <span style="color:#b91010">{
    name: 'Creature'
}</span>);
console.log(myMammal.name);           // Logs "Creature"
</pre>


Since _you_ define those properties, you can
look for them in class methods and use them as needed.
Let's add a `speak()` method that uses the `name` property.

<pre class="neo" style="color:gray">
import Base from '../../../node_modules/neo.mjs/src/core/Base.mjs';

class Mammal extends Base {
    static config = {
        className: 'Simple.example.Mammal',

        name: 'Anonymous'
    }
    <span style="color:#b91010">speak(){
        console.log(`${this.name} is grunting`);
    }</span>
}

const myMammal = Neo.create(Mammal, {
    name: 'Creature'
});
<span style="color:#b91010">myMammal.speak();</span>        // Logs "Creature is grunting."

Neo.setupClass(Mammal);

export default Mammal;
</pre>



