@screeb/sdk-react 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/es/index.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ const App = () => (
|
|
|
69
69
|
|
|
70
70
|
// Anywhere in your app
|
|
71
71
|
const HomePage = () => {
|
|
72
|
-
const {
|
|
72
|
+
const { eventTrack } = useScreeb();
|
|
73
73
|
|
|
74
74
|
const onButtonClicked = React.useCallback(
|
|
75
75
|
() => eventTrack(
|
|
@@ -86,7 +86,7 @@ const HomePage = () => {
|
|
|
86
86
|
};
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
For a working example, see our [Screeb
|
|
89
|
+
For a working example, see our [Screeb React SDK example app](https://github.com/ScreebApp/sdk-js/tree/master/packages/screeb-sdk-react-example).
|
|
90
90
|
|
|
91
91
|
For a more advanced usage and a complete API documentation, see [documentation generated from source files](https://github.com/ScreebApp/sdk-js/tree/master/packages/screeb-sdk-react/docs).
|
|
92
92
|
|
|
@@ -100,4 +100,4 @@ All third party contributors acknowledge that any contributions they provide wil
|
|
|
100
100
|
|
|
101
101
|
## License
|
|
102
102
|
|
|
103
|
-
Released under [MIT License](https://github.com/ScreebApp/sdk-js/blob/master/LICENSE).
|
|
103
|
+
Released under [MIT License](https://github.com/ScreebApp/sdk-js/blob/master/LICENSE).
|
package/dist/es/index.js
CHANGED
|
@@ -328,8 +328,8 @@ var ScreebProvider = function (_a) {
|
|
|
328
328
|
var useScreebContext = function () {
|
|
329
329
|
var context = React.useContext(ScreebContext);
|
|
330
330
|
if (context === undefined) {
|
|
331
|
-
// eslint-disable-next-line
|
|
332
|
-
|
|
331
|
+
// eslint-disable-next-line no-console
|
|
332
|
+
console.warn("`useScreeb` must be used within `ScreebProvider`.");
|
|
333
333
|
}
|
|
334
334
|
return context;
|
|
335
335
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@screeb/sdk-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Screeb's browser sdk, optimized for React.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"product discovery",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"test": "echo '@TODO'"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@screeb/sdk-browser": "^0.1.
|
|
49
|
+
"@screeb/sdk-browser": "^0.1.11"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@screeb/eslint-config": "^0.1.6",
|