Home Blog Project Portfolio Bootcamp Journal More About Me Contact

Week 7

Topics Included: React, Intermediate JavaScript, C#

Monday 19th February

To start the week, we were introduced to React. This included learning about components (inc differences between class and functional) and the use of props. As you can see in the images below, I experienced using create-React-app for the first time and the writing of components.

I started writing components in React.
Here you can see the first React code I wrote.
The React code I wrote showing on the connected web page.
Here you can see the code as it appeared on the web page.
In the afternoon, we were given a challenge which included the insertion of images using React. Rather than being shown how to do this straight away, we were challenged with researching how to do it ourselves. As you can see in one of the screenshots below, I worked out how to insert a picture of my dog using props.
The use of props.
I was introduced to props. Here you can see the use of props to insert names from another file.
The use of props when inserting an image.
The code I wrote for the insertion of an image in React.
How the image looked on the web page.
Here you can see the image of my dog, Sasha, on the web page.

Tuesday 20th February

On the Tuesday, we learnt about coding paradigms. This included studying the differences between procedural programming, event driven programming and object oriented programming. We were also tasked with choosing the most suitable coding paradigm for a range of case studies.

Wednesday 21st February

On the Wednesday, we continued the study of React. We looked further into the use of props. Also, we were introduced to the use of state, the map method and onClick. We were tasked with creating a lookalike of the BBC sport website and asked to store images, categories and titles in objects with a state hook. We were instructed to then iterate through them using the map method.

Code we were shown when recreating a BBC Sport lookalike.
Here you can see example code we were shown for the creation of a BBC Sport lookalike.

Thursday 22nd February

On the Thursday, we were introduced to learning how to use C#. We used it to create a dice roller. This involved the installation of .net and the creation of a number of files (see screenshot below). An example of the code can be seen below:

The files included in the dice roller activity
A screenshot of files included in the C# dice roller activity. It was quite a challenging introduction to C# but I found it interesting. It added variety to our learning schedule.
C# code included in the dice roller activity
This is some of the C# code that I was required to write for the dice roller activity.

Friday 23rd February

Friday, of week seven, was another action-packed day with lots of challenges and new content. In the morning we were given half an hour to work on Codewars challenges and improve our Kata. I completed the challenge below which involved converting a number to a string using JavaScript. As you can see by the two images, I answered it in two different ways (one with the use of a template literal).

.
.
.
.

Next, we were put into groups and given React themed tasks to complete in jsComplete. This meant drawing on the basics we had learnt on Monday and Wednesday and putting them into use. The screenshots below, from this activity, show the use of props:

Using props in jsComplete as practice for React.
More use of props in jsComplete.

For the rest of the day, we learnt about React in more depth. This included learning about the use of conditional rendering, controlled components and ternary operators in React.