-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added constants exported from android. #6
Conversation
Started breaking more things out into files
I dunno what our CI is doing. Maybe lets just force merge this and follow up to fix CI. |
example/src/App.tsx
Outdated
EventProperty, | ||
EventType, | ||
} from 'klaviyo-react-native-sdk'; | ||
import { multiply } from '../../src/KlaviyoReactNativeSdk'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not forget to delete the example method soon lol
@@ -0,0 +1,29 @@ | |||
import { NativeModules, Platform } from 'react-native'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extracted this to its own file so that I could import it from index and from constants
@@ -25,11 +41,19 @@ class KlaviyoReactNativeSdkModule internal constructor(private val context: Reac | |||
|
|||
@ReactMethod | |||
override fun createEvent(event: ReadableMap) { | |||
println(event) | |||
val parsedEvent = event.toHashMap() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just adjusted this so the app functions
Started breaking more things out into files
Created a constants file, figure we can also create events.ts, profile.ts etc to store our separate types.