# Some ionic style are not properly loaded

**URL:** <https://forum.ionicframework.com/t/some-ionic-style-are-not-properly-loaded/210184>\
**Category:** Ionic Framework\
**Created:** [May 27, 2021, 11:42am UTC](https://forum.ionicframework.com/t/some-ionic-style-are-not-properly-loaded/210184 "2021-05-27T11:42:07Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [May 27, 2021, 7:18pm UTC](https://forum.ionicframework.com/t/some-ionic-style-are-not-properly-loaded/210184/4 "2021-05-27T19:18:18Z")

</div>

Disclaimer: I know absolutely nothing about React.

My initial suspicion is that you have a race condition with a side order of uncaught exception.

At least with Angular, there are many situations where my app code gets called in the middle of what is effectively a framework execution context, like:

```auto
lifecycleEventHandler() {
  doSomethingWith(this.jankilyInitializedProperty.ruhroh);
}

someOtherFunction() {
  doAsynchronousThing().then((foo) => this.jankilyInitializedProperty = foo);
}

```

If `doAsynchronousThing` completes before `lifecycleEventHandler` gets called, everything works great and you don’t notice a thing. If it doesn’t, an exception will be thrown when you try to access the `ruhroh` property of `undefined`. If `lifecycleEventHandler` was called as part of some sort of framework pseudocode like:

```auto
frameworkInternals(compo: Component) {
  compo.lifecycleEventHandler();
  attachStyles(compo);
}

```

…and `lifecycleEventHandler` throws an uncaught exception, `attachStyles` never gets run, and you end up with broken styling, unresponsive controls, &c.

With Angular, there are [things you can set in `tsconfig.json`](https://forum.ionicframework.com/t/object-keys-not-response-in-the-ionic-app/209963/2) that will turn these sorts of bugs into build-time errors, allowing you to audit your code for such problems in a more deterministic fashion than simply waiting for them to bite you.

---

_[View the full topic](https://forum.ionicframework.com/t/some-ionic-style-are-not-properly-loaded/210184)._
