Friday 23 August 2019

javascript - How can I call a global function in React?

Yesterday I had an interview for React developer position. Interviewer asked me about global functions and how to create and call global functions with React ?




I thought he is talking about Redux and state containers ...



But he said, no ... it's not about state containers and it's about react services.



Since after interview I searched about react services, but I didn't find any thing.



What do you think about this feature and global functions ? I should import global functions above all components or here is different method to handle this ?



Thanks

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...