-
Notifications
You must be signed in to change notification settings - Fork 237
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
Don't work with React HOOKS #991
Comments
Please support the function components with hooks. |
Yes I would suggest a hooks implementation ASAP for react since that is the direction it's headed. |
wrote a custom hook to replace withAITracking, seams to work ok, i have a 'key' paramter because i have a tabbed UI in the component i am tracking, and the key is the tab state function useAITracking(componentName, key) { } |
I've done a write up on how you can create custom hooks to work with AppInsights, you'll find it here: https://dev.to/aaronpowell/combining-react-hooks-with-appinsights-5692 In it there is a Context, allowing you to Does it look like what people would expect from a programmatic model of AppInsights + Hooks? |
Included in v 2.5.5 which is now fully deployed |
@aaronpowell @MSNev is there any official documentation on how to use the new stuff for react hooks? |
I second this question. Is there any documentation? |
Docs have been written and are currently being reviewed by our content team. Fingers crossed they should be available soon. |
Docs are now published - https://docs.microsoft.com/en-us/azure/azure-monitor/app/javascript-react-plugin#using-react-hooks |
thanks for this! |
@aaronpowell It would be great to have those docs in the react Readme.md as well |
Suggestion from microsoft#991 (comment)
Good suggestion @dps88. I've opened a PR to add it. |
I have been attempting to get the Hooks based implementation to work in one of my current apps and I am having a few issues being certain if it is working as intended. Setup Context Usage
In the console, I see the "track" network request, but it seems like the "additionalProperties" are not logged or tracked. This makes it impossible to do any splitting or aggregation on the AI side. So I feel like Im on the right track, but I must be missing something. Additonally, I tried following the user-invoked |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Please send suport for React Hooks, components class is obsolete.
The text was updated successfully, but these errors were encountered: