Question on autofocus for form field

Think of components as isolated scopes. They won’t know of anything unless you tell them about it. There are two ways to give data to components. 1. Attributes and 2. dependency injection. You’re running into issues with both here.

Component attributes

You’re component doesn’t know about model internally because you need to pass it in. Invoking the component with the model attribute will make model available in your component

{{create-form model=model}}

Dependency injection

For certain things, it’s easier to inject them into a component rather than pass them in. These “things” are known as services in ember. In javascript parlance, they are singletons. This means there is a single one that the framework keeps around for you (rather then destroying and recreating it each time you use it, like components). There are many reasons this is really nice. In your example, the store is a service that you will need to inject in order to use within the component.

import Component from '@ember/component';
import { inject as service } from '@ember/service';  // Import the service injector

export default Component.extend({
  store: service(), // Tell the component what service you want to inject. 
  storeService: service('store') // The above is a shorthand. You could also do this
  ....
  this.get('store').createRecord.....
});

Note the usage this.get(). For now, use .get whenever you access properties.

Anyway, I hope that makes sense.