Skip to content

Instantly share code, notes, and snippets.

@aem
Created April 18, 2017 14:09
Show Gist options
  • Save aem/b4e35b5c2e21143cbbb4687db33ba452 to your computer and use it in GitHub Desktop.
Save aem/b4e35b5c2e21143cbbb4687db33ba452 to your computer and use it in GitHub Desktop.
class ReactResultRouter(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
@Inject lateinit var reactEventDispatcher: ReactEventDispatcher
init {
HubspotOneApp.get(reactContext.baseContext).component().inject(this)
}
override fun getName(): String = "ReactResultRouter"
@ReactMethod
fun routeResults(results: ReadableMap) {
reactEventDispatcher.route(results)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment