diff --git a/docs/md/entity.md b/docs/md/entity.md
index b4790dc89..59651ed82 100644
--- a/docs/md/entity.md
+++ b/docs/md/entity.md
@@ -1190,9 +1190,7 @@ thrown away. The reasons for this go far beyond the scope of this document.
To iterate a runtime view, either use it in a range-for loop:
```cpp
-using component_type = typename decltype(registry)::component_type;
-component_type types[] = { registry.type(), registry.type() };
-
+entt::component types[] = { registry.type(), registry.type() };
auto view = registry.runtime_view(std::cbegin(types), std::cend(types));
for(auto entity: view) {
@@ -1210,10 +1208,9 @@ for(auto entity: view) {
Or rely on the `each` member function to iterate entities:
```cpp
-using component_type = typename decltype(registry)::component_type;
-component_type types[] = { registry.type(), registry.type() };
+entt::component types[] = { registry.type(), registry.type() };
-auto view = registry.runtime_view(std::cbegin(types), std::cend(types)).each([](auto entity) {
+registry.runtime_view(std::cbegin(types), std::cend(types)).each([](auto entity) {
// ...
});
```