Cleanup react components
See original GitHub issueSince the react-figma-plugin-ds
dependency is broken, I recently “imported” the components that are used in this plugin.
However they need to be cleaned up, including the css.
This includes (but is not limited to):
- Button
- Checkbox
- Select
- Title
- Input
- Label
- Text
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Understanding React's useEffect cleanup function
According to React's official documentation, “React performs the cleanup when the component unmounts. However… effects run for every render ...
Read more >React useEffect cleanup: How and when to use it
This is very useful because we can use it to remove unnecessary behavior or prevent memory leaking issues.
Read more >How to use react clean-up function with example - Dev Genius
This clean-up function is to be used to clean up the effect of an old side effect. This function is obligatory called before...
Read more >Why you should always Cleanup Side Effects in React ...
The cleanup function in useEffect is a handy function that gives us as much power as class components. There's the componentWillUnmount ...
Read more >React useEffect cleanup
Cleaning up useEffect permalink ... The hook comes with a cleanup function, which you might not always need, but it can come in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, no worries, makes sense. I removed the two labels, as I realised that it has more complexity to it than I thought. Working on open source is a great idea though. Just find another problem to solve here or in another project. 👍
Cheers & thanks for offering help.
Sure, so the components are mainly copied from the
react-figma-plugin-ds
package.This means there is probably css in there that is never used in the plugin. -> This css should be removed.
Also there may be states in the components that are never used. Those states should be removed as well. This often leads to being able to remove more code from the components.
The goal of this is that the components react code & css (which is within the .tsx file) gets less complex.
Hope that helps.