Unfortunately, the best answer is "use them each as appropriate where necessary".
Parenthesis () in JavaScript are used for function calls, to surround conditional statements, or for grouping to enforce Order of Operations.
function myFunc() {| /** @jsx jsx */ | |
| import { jsx } from "theme-ui" | |
| import React from "react" | |
| import { graphql, useStaticQuery } from "gatsby" | |
| import styled from "@emotion/styled" | |
| import BackgroundImage from "gatsby-background-image" | |
| import useBackgroundImage from "./useBackgroundImage" | |
| const BackgroundImageContainer = ({ className }) => { | |
| const data = useBackgroundImage() |
| const TestApp = () => { | |
| const [colorMode, setColorMode] = useColorMode() | |
| setColorMode("dark") | |
| return ( | |
| <Box bg="primary" height="100px" width="100px"> | |
| <Text color="highlight">Test Text</Text> | |
| </Box> | |
| ) | |
| } |
| /** @jsx jsx */ | |
| import { jsx, Container } from "theme-ui" | |
| import React, { useState } from "react" | |
| function Demo2() { | |
| const [isVisible, setIsVisible] = useState(true) | |
| return ( | |
| <div style={{ display: isVisible ? "block" : "none" }}> | |
| <p>This is the visibilityi test div</p> |
| To get the windows' dimensions : | |
| var width = window.innerWidth; | |
| var height = window.innerHeight; | |
| To get the screen's dimensions : | |
| var width = screen.width; | |
| var height = screen.height; |
| const arr = ["The fastest way to", <br />, "build the fastest sites."] |
| import React, { Component } from "react" | |
| import MyLink from "../base/MyLink" | |
| class LinkList extends Component { | |
| render() { | |
| const linksToRender = [ | |
| { | |
| id: "1", | |
| description: "Prisma turns your database into a GraphQL API 😎", | |
| url: "https://www.prismagraphql.com", |
| import React, { Component } from "react" | |
| import MyLink3 from "./MyLink3" | |
| import { StaticQuery, graphql } from "gatsby" | |
| const LinkList3 = () => { | |
| return ( | |
| <StaticQuery | |
| query={graphql` | |
| query { | |
| site { |
Unfortunately, the best answer is "use them each as appropriate where necessary".
Parenthesis () in JavaScript are used for function calls, to surround conditional statements, or for grouping to enforce Order of Operations.
function myFunc() {| DEL /F/Q/S *.* > NUL | |
| /F -- forces the deletion of read-only files. | |
| /Q -- enables quiet mode. You are not ask if it is ok to delete files (if you don't use this, you are asked for any file in the folder). | |
| /S -- runs the command on all files in any folder under the selected structure. | |
| *.* -- delete all files. | |
| > NUL -- disables console output. This improves the process further, shaving off about one quarter of the processing time off of the console command. | |
| RMDIR /Q/S foldername |