Skip to content

Conversation

@cwlsn
Copy link
Owner

@cwlsn cwlsn commented Sep 2, 2018

Changes

This PR adds the first component, a simple Button. The structure of the Button.js file is a new one for me, using the function syntax to create a function component. One thing to note is that I am not using the .jsx extension. React knows what it's rendering, I prefer the cleaner folder. In the folder is also a README with a somewhat detailed code example. In the future READMEs should have details on the props and whatnot they interact with.

The index.js files in the src and components folders are now set to export the components. src exports them all blindly, but components is an explicit export. This architecture is meant to be easy to scale later, and tools like Generact make it easy to duplicate this elaborate folder structure.

I also moved the babel config out from the webpack config to its own .babelrc after adding the React preset.

What do

Fixes #3

@cwlsn cwlsn self-assigned this Sep 2, 2018
@cwlsn cwlsn added 🗄️ new dependencies Changes to project dependencies were made. 🏡 housekeeping Updates that don't impact the code, but keep the project running smoothly. :atom: new component A new React component is being added. 📃 documentation Changes to documentation were made. labels Sep 2, 2018
@cwlsn cwlsn merged commit 785e072 into master Sep 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:atom: new component A new React component is being added. 🗄️ new dependencies Changes to project dependencies were made. 🏡 housekeeping Updates that don't impact the code, but keep the project running smoothly. 📃 documentation Changes to documentation were made.

2 participants