I don't really like them to much. Yes they are flexible; but when you go looking through code to find where they are used, the only way to be sure that you find them all is to do the following:
- Search for the file name.
- Look at each import and see if it is using the default.
- Use the name of the default to search in the file
I prefer to used the named include. Using the named to look through code is more straightforward.
- Search the code for the name of exported.
- All references to it will show up include the import.
The 'named' import gives a nice view of both where it is being imported and where it is being used all at the same time. Yes, I prefer to used the 'named' import.
No comments:
Post a Comment