<p align=center>
  <img width=300 height=auto src="../../../public/bio_logo_transparent2.png"/>
</p>

# Bio: import syntax for components
## 0.0.0.2021
### 2.1
> Bio allows importing components using the following syntaxes:
> - `ImportStatement ComponentTypeStatement ComponentNameList FromStatement String`
> - usage: `import component { Hello } from './Hello.bio';`
> - the ComponentTypeStatement doesn't have to match with the type of the component. [see types here](../component/types.md)

### 2.2
> Bio allows absolute, relative, remote imports
> - absolute with the following syntax: `import component { Hello } from '@/Hello.bio';`
> - relative with the following syntax: `import component { Hello } from './Hello.bio';`
> - remote with the following syntax: `import component { Hello } from 'http://somewhere.net';`

### 2.3
> Bio allows developer to use `esm` imports

### 2.4
> users are not allowed to export an `app` component, which is the root of the application

### 2.5
> users can have access to a component only if it's exported with the `ExportStatement`
```typescript
// ./Exported.bio
export component <Exported></Exported>

// ./Import.bio
import component { Exported } from './Exported.bio';

app <App>
  <Exported />
</App>
```
> if there's no matching component regarding the name provided in the import statement, Bio will throw an exception.