Add useful example for the `getData` method
ilfa opened this issue · 3 comments
ilfa commented
In the example below we show how to call the getData
method but don't afford any useful scenarios of what we can do with that data.
We need to add a better scenario to the documentation.
<form
onSubmit={(e) => {
e.preventDefault()
getData().then((data) => {
if (data) {
// do something with the visitor data
// for example, append visitor data to the form data to send to your server
console.log(data)
}
})
}}
>
JuroUhlar commented
@ilfa Is this still relevant? I am not sure I can come up with something more meaningful than we already have without making the code snippet overly complicated and distracting from its main purpose.
We have a whole repository of useful examples, maybe we can just link to it somewhere?
ilfa commented
Nice idea! Could you add the link to the readme?