Closed birkir closed 5 years ago
Component Imports
How faster it would change on our apps we are doing? Would it be much faster? Is the time we gain here, we wouldn't lose it by finding components folder and parents?
Aliases
It looks quite nice to me!
Typedefs
Looks a bit too much, and as the project will grows, it will get more warnings everywhere, I guess :/
What about renaming the directory store
to stores
?
Okay very good, minor conflicts, still a lot of work to do, to streamline this.
Let's focus on a React Native only ruleset for now, and then think about react-dom projects later.
100% agree, let's see first if it fits well on Typescript RN.
It looks good for everything. I'm still not sure for components imports/default import. How do we want to decide between the maintenance/readability side and the faster side
I did run this branch, but I didn't get any errors for the imports blanks lines, neither on vscode or command line, did you also have this behavior?
Worked for me 🤔
Component Imports
One recommendation is to never use default exports, this would mean our index pointer files would have to be something like
export { Button } from './Button'
- We could skip them all together and just import them directly likeimport { Button } from '~components/button/Button
or stick with the index files and doimport { Button } from
~components/button`.Pro: faster Con: maintainance, readability
Aliases
What do we think about aliases, should alias certein folders with the
~
(I found out the @ symbol is restricted). This would mean we would have to update our tsconfig and tslint files respectively when adding more root folders.Pro: faster Con: maintainance
Typedefs
To much? I added
call-signature
,parameter
andmember-variable-declaration
.Pro: autocomplete, editor intelligence, type safety. Con: maintainance, slow