-
Notifications
You must be signed in to change notification settings - Fork 0
Tutorial
AC De Leon edited this page Sep 15, 2018
·
17 revisions
Let's learn how to develop simple pieces of the website to prepare you for coding the actual site!
Stuck? Check out branch
tut-kdofor reference!
- Pull the branch called
tutorial - Create a branch
tut-<First Name Initial + Last Name>from the tutorial branch
First Name: Kevin (k)
Last Name: Do (do)
Branch name: tut-kdo
- With VSCode open, open the terminal and type
yarn(You should be in the AztecGameLaboratory directory!)
C:\Users\YOUR_COMPUTER_NAME\WHERE_THE_REPO_WAS_CLONED\AztecGameLaboratory> yarn
- Start your development locally on your computer with
yarn start - Open the
tutorialfolder located insrc/ - Create your own folder as tut-<First Name Initial + Last Name> within the
tutorialfolder
First Name: Andrew (a)
Last Name: De Leon (deleon)
Folder name: tut-adeleon
- Create a file named
Tutorial.js - Create a class component <First Name + Last Name> + Tutorial
- KevinDoTutorial
- Create a functional component and add it to your class component
- Import that component in App.js
Redux Documentation Reselect Documentation
- Import react-redux
- Connect your component
- Add mapStateToProps
- Use a selector to retrieve testData
- Display testData.test within your tutorial component
- Add a mapDispatchToProps to your component
- Import testAction
- Create a button to use the testAction
- Observe that in Redux Dev Tools that the state changed!
- Make your own action in testActions.js
- Edit the testReducer.js to receive and change it's state based on that action!
- Create a unit test for your component
- yarn test
- Make sure it works
- Submit a PR to merge your tut-<First Name + Last Name> into tutorial
- Use the PR template under .github folder or in the wiki
- Assign reviewers and yourself as assignee on the right sidebar
Finally, the checks will run, someone will approve and you're officially a AGL Developer! Please ping me if you have any questions and check out my tutorial branch tut-kdo if you get stuck!