-
Notifications
You must be signed in to change notification settings - Fork 94
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
Example with react hooks usage? #267
Comments
It depends on what do you want to accomplish using hooks? Can you please describe your use case? Currently the hooks provided can be used to extend the functionality. For example: |
Hi, @anajavi thanks for the quick response. I'm currently using In terms of hooks, I saw your recent release notes where you have migrated from HOC to hooks and I was curious to find out more examples as some the current example code were still on HOC's. PS. I have not yet decided what I will achieve with the help of hooks in this library but I wanted to learn how this library could help achieve the configurable options I'm trying to. Your ideas are much appreciated. |
The examples are still using withHighcharts hook, which can be replaced with I don't think you need any hooks for the dynamic chart type and axes. Updating chart type for example was just fixed in v4.0.1 in #265. Axes can be added dynamically too just by adding and removing Here's an example of changing chart type: https://stackblitz.com/edit/react-1zdbcb?file=Hello.js |
Thank you, I will have a check. |
There's no typescript typings as far as I know. Highcharts itself seems to have them now, so it might not be such an huge task anymore. react-jsx-highcharts doesn't have too many typings for itself, most are just passed to highcharts so any typings should just reference highcharts types. a PR would be welcome.
There are no flow typings for Highcharts, so making them for this library is a huge task. |
@anajavi 👍 |
Description
Is there an example of using this library with react hooks?
The text was updated successfully, but these errors were encountered: