I have a pretty straightforward question (hopefully). Is it possible to implement a react component in a module, as a functional component as opposed to a class component? It seems like there are a lot of classes from @inductiveautomation/perspective-client that are meant to be extended, but I wanted to ask just to be sure.
Should be:
Okay, so it should be possible. Could I get your opinion on functional vs. class components in Ignition. Functional is what I'm used to already and has more options with hooks, but is there something specific to Ignition that could give class component implementation an advantage?
Edit: or in other words, is there any reason why I wouldn't want to go with implementing functional components?
Nope, you want to use functional components.
4 Likes
There's zero practical difference as far as I know (not a React/front end dev primarily), so yeah, go with whatever is more comfortable for you.
1 Like