Month: July 2020

  • Avoiding Wildcard imports in Java/Kotlin with IntelliJ

    What is a wildcard import or a star import? When you want to import multiple classes from the same package like this: Java has an option to combine them into a single line using wildcard imports: Is it bad? Performance-wise, no. Using a wildcard import doesn’t actually import all the classes in the package. When […]

  • First look at HTML

    HTML is used to feed the content on the web page or web application. HTML = content. HTML is not used for styling the page if you want to style then you need to use CSS. HTML ≠ style. CSS = style. HTML Document Structure All HTML document must start with <html> and end with […]

  • How to run an HTML file?

    Many modern editors are available to create and modify web pages. But we recommend using simple editors like Notepad (windows) and Textedit (Mac). How to open Notepad in windows? Open start and type notepad at search. (OR) Open Start > Programs > Accessories > Notepad. How to open Textedit in Mac? press command + space enter Spotlight search will appear […]

  • React: How to use Apollo with ‘Union Types’ in GraphQL

    React: How to use Apollo with ‘Union Types’ in GraphQL

    Apollo is one of the most popular React library to work with GraphQL APIs. However they don’t have native support when your APIs contain union types. Let’s look at an example API that contains union types and how we can work with them using Apollo. Assuming you have an API like this: that returns this […]