Motor
Home
Demo
Community
Search…
Motor
Motor Docs
@motor-js/engine
Introduction
Getting Started
Video Tutorials
Removing the Watermark
Examples
Components & Contexts
Motor
Engine Context
Login
Not Connected
Hooks
License for @motor-js/engine
@MOTOR-JS/NEBULA
Introduction
Getting Started
Components & Contexts
@motor-js/cli
Introduction
Getting Started
CLI Help
Mashup Templates
Overview
Getting Started
Templates
Helpful Links
Release Notes
Discord Community
Pricing
GitHub
Powered By
GitBook
Engine Context
The context for accessing the engine API
Usage
You can access the Qlik engine in any component in your React component tree, see below for an example which returns the engine to the console.
1
import
React
,
{
useContext
}
from
'react'
2
import
{
EngineContext
}
from
'@motor-js/engine'
3
4
const
Example
=
()
=>
{
5
6
const
{
engine
,
engineError
}
=
useContext
(
EngineContext
)
7
8
console
.
log
(
engine
)
9
10
return
(
11
<
div
>
12
Engine Example
13
</
div
>
14
)
15
}
16
17
export
default
Example
18
Copied!
Previous
Motor
Next
Login
Last modified
1yr ago
Copy link