codeprinter
codeprinter copied to clipboard
Take advantage of React Hooks
React Hooks didn't exist when codeprinter was last overhauled. Look into how it may benefit the project and make the necessary changes.
Hi there,
I came across codeprinter when I was trying to print some code solutions out. I found the app helpful, and since I've never contributed to an online open source app before, I thought I'd run through this issue. Essentially all I did was convert the class components to functional components and implement the useState() hook. Nothing too fancy. I didn't find any opportunities for useEffect() or useRef(), for example.
I've never pushed a PR for a project I wasn't part of before, but I'm happy to do so if there's any interest. The code seems to still work just fine, and all the tests are still passing. Let me know, and thanks again for building this!
Best regards, Ziv