Closed aeltanawy closed 9 months ago
Thanks @aeltanawy - it's a great idea, or maybe we keep the class-based components but add functional alongside, so it's clear you can do it either way?
Thanks @alexcjohnson ! That seems like a great way to add flexibility. Would that possibly be a choice the user have to make when answering the questions about the project?
Could be a choice, but I was imagining just putting two components side-by-side. To turn the boilerplate into a real package you need to delete the example components anyway, so adding a little more that also needs deleting seems to me unlikely to bother anyone, might even be helpful because it would show clearly how to put multiple components in one package.
Interesting! So have both components and import them in usage,py
?
Can I work on this?
Absolutely, we’d be delighted to accept a PR adding a functional component here!
Thanks @aeltanawy - it's a great idea, or maybe we keep the class-based components but add functional alongside, so it's clear you can do it either way?
Already I create react component by functional mode. But really missed this template in boilerplate.
@alexcjohnson Has there been any update on adding a functional-based component in the template alongside the class components? I'm looking into sources to create react components in functional mode instead of class-based mode. Any help is appreciated :)
@tinanemati it hasn't bubbled up to the top for anyone at Plotly to add but we'd welcome a PR for this purpose!
Apologies for the delay here. I have resumed working on this issue and will be posting a PR later today.
@aeltanawy Thank you, Abeer!
Apologies for the delay, I was troubleshooting an unexplained issue that got resolved by creating a new fork.
I'm interested in creating my own dash component using React and while generating a project using
dash-component-boilerplate
, the output React files are written using class components. Any plans on migrating that to functional components instead?I've already migrated my own project files but thought to bring this topic up for discussion since the latest React docs are all written using functional components and while it is still in Beta, they do mention that these will replace the older docs.
Thanks!