Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/styled component #114

Merged
merged 3 commits into from
Oct 12, 2019
Merged

Feat/styled component #114

merged 3 commits into from
Oct 12, 2019

Conversation

wincentrtz
Copy link
Contributor

This is what i have done:

  • Installing styled component dependencies
  • Doing some folder refactoring on hello component
  • Adding styled component on hello component

Copy link
Owner

@anikethsaha anikethsaha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me
Left few suggestions
also, what do you think of making hello.js -> hello.jsx ?
You can convert that to class component too if you want!

src/client/components/hello/style.js Outdated Show resolved Hide resolved
src/client/router/appSwitch.jsx Show resolved Hide resolved
@anikethsaha
Copy link
Owner

You can now make changes in your local machine and then push it to your branch itself. Thos will be reflected here automatically

@wincentrtz
Copy link
Contributor Author

wincentrtz commented Oct 12, 2019

Actually there's no hello.js in this commit

I move it into a hello folder and put index.js and style.js inside. I guess that's better and it will make our import statement shorter too.

But if we want to keep it as hello.jsx, we can create a folder called styled with same level with test,

This is the current structured:
image

This is the structured I suggest if we want to keep file name as hello.jsx:
image

What do you think @anikethsaha ?

@anikethsaha
Copy link
Owner

Ohh sorry, my bad...I meant index.js -> index.jsx ?
No, you can keep it index itself ...the folder name hello looks good....we can keep everything related to that in that folder like tests and all 👍

@wincentrtz
Copy link
Contributor Author

wincentrtz commented Oct 12, 2019

If we change it to index.jsx i guess there'll be a problem for javascript import statement. Where they can't detect index.jsx itself.

This is our previous import statement:
image
We dont need to specify index.js at the end of import statement, because it's index.js

but when we're using jsx i'm facing this kind of issue
image
and we need to add index.jsx at the end of import statement
is it okay?

@anikethsaha
Copy link
Owner

Yea I faced that too. Actually I changed all components to jsx and added .jsx at the end of the imports. I don't know why it's like that maybe some error in placing babel plugin.
Ok, you can leave it as it is. No need to change it for now.
Add some styles to the div (container) #114 (comment)
and then we are good to go for merging it 👍

@wincentrtz
Copy link
Contributor Author

Awesome then!
I have pushed the new one @anikethsaha

Please check it once more :)

Thank you

Copy link
Owner

@anikethsaha anikethsaha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work 🎉

@anikethsaha anikethsaha merged commit d4b7539 into anikethsaha:master Oct 12, 2019
@anikethsaha
Copy link
Owner

@all-contributors please add @wincentrtz for code

@allcontributors
Copy link
Contributor

@anikethsaha

I've put up a pull request to add @wincentrtz! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants