yardz commented on a change in pull request #13220:
URL: https://github.com/apache/superset/pull/13220#discussion_r580608860



##########
File path: superset-frontend/src/components/FlashProvider/index.tsx
##########
@@ -37,21 +36,19 @@ const flashObj = {
   success: 'addSuccessToast',
 };
 
-class FlashProvider extends React.PureComponent<Props> {
-  componentDidMount() {
-    const flashMessages = this.props.common.flash_messages;
-    flashMessages.forEach(message => {
+const FlashProvider: React.FC<Props> = ({ children, messages }) => {

Review comment:
       >Whether you will export them later
   
   In this case, the person who places an export simply adds the prefix. It’s 
not complex to do that, just read rsrs
   or add more components in the same file. Always adding the prefix helps you 
not to have to worry about this.
   
   > add more components in the same file
   
   This is an extremely bad practice. Glad that not adding a prefix gets in the 
way to add more than one component per file.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to