Writing a paper is complicated! Yes, and you have to juggle between different resources to get citations, survey for data, look for research funding, and all of which wastes time from the actual research work.
An array allows us to represent a collection of data, but it is often more useful to think of an array as a collection of variables of the same type with keys having sequential order based off the order they were added.
Instead of declaring individual variables, such as number1, number2, number3, ….., and number99, you can declare one array variable such as numbers and use numbers, numbers, …, numbers to represent individual variables.
There are a lot of resourceful materials online that give good insights into pagination in ReactJs, as well as NPM packages you can easily use. As much as I appreciate those materials and love to use those packages, they mostly deal with loading the whole dataset on the page first then completely handle the pagination in the frontend. I am approaching this article with the concept of loading the exact data needed on the page, then manually loading other dataset based on the request when the user clicks the pagination number display. …
If you prefer a more elaborate video tutorial on handling forms in ReactJs(includes using controlled, uncontrolled, class component, functional component also how to use form library called REACT HOOK FORM), you can check out my youtube channel, everything in this post is covered there and I published the complete course on udemy.
Forms are very useful in any web application. Unlike with Angular and AngularJS, which give you form validation out of the box, you have to handle forms yourself in React. …
variable values, something you will assign and can always change at any point in time.
const if you want to create a
constant value, something you will assign once and will never change.
We need to use the
export keyword if we are going to use a particular module within another module. The
default keyword in the Person.js…
There are some views that automatically size themselves base on the content they hold, This is referred to as their
intrinsic content size. E.G A button’s intrinsic content size is the size of its title plus a small margin. Not all views have an intrinsic content size. For views that do, the intrinsic content size can define the view’s height, it’s width or both.
Let say we have a button with the text “Click Me”.
Layout is the way in which the parts of something are arranged or laid out. When designing user interfaces in swift, we have to consider how the elements are arranged, and how it will be rearranged on different screen sizes. To layout user interfaces such that they can adapt to changes based on different screen sizes in swift, we have to use autolayout.
Auto layout simple means we describe the position where our interfaces should be, then the system will automatically position the interfaces for us.
Auto layout is a constraint base descriptive system whereby the relationship between two views…
A protocol defines a blueprint of methods, properties, and other requirements that suit a particular task or piece of functionality. The protocol can then be adopted by a class, structure, or enumeration to provide an actual implementation of those requirements. Any type that satisfies the requirements of a protocol is said to conform to that protocol.
So, keeping it simple, a protocol says a struct , class or enum that if you want to be THAT, do THIS, this and This. Example: if you want to be a developer, you have to READ, and WRITE CODE.
We can create a…
Enumeration (Enum) defines a common type for a group of related values and enables you to work with those values in a type-safe way within your code.
Assuming we have a method named
dayType that accept any day of the week then return
Saturday and Sunday,
Monday, Tuesday, Wednessday, Thursday and Friday and return
This is not a valid date when it fails to recognised what was been passed into it. The function will work as aspected but what happens when you actually want to pass let say a
friday but you mistakingly type
There are situations where we wish to accept data from users and also provide an opportunity for some of the data to be optionals, meaning they are not required but should be provided if available.
me instance of a person provided all the data but the constant
anotherPerson cannot provide all the data because he probably does not have a middlename. Hence he passed
nil as the value of the
middlename. Sounds cool right but the
nil passed will cause an error, Why?, because we have not told swift to make the middlename
An optional in…