- Initial package manager with
npm
oryarn
by running
npm init
#or
import React from 'react' | |
import { | |
Block, | |
BLOCKS, | |
Inline, | |
INLINES, | |
MARKS, | |
} from '@contentful/rich-text-types' | |
import { renderRichText } from 'gatsby-source-contentful/rich-text' | |
import * as styles from './rich-text.module.css' |
// 1. removed the setData argument from the useEffect since we dont need to check for this | |
// we can use userId to re-run the effect if userId changes | |
// 2. added a suspense fallback | |
// 3. added export default UserProfileList to the end of the file | |
import { Suspense, useState, useEffect } from "react"; | |
import { fetchUserProfile } from "./profiles"; | |
const SuspensefulUserProfile = ({ userId }) => { | |
const [data, setData] = useState({}); |
<!-- | |
In the past, the DOCTYPE was needed to specify HTML versions. | |
As of HTML5, providing `html` is sufficient. | |
It is somewhere between a proper HTML tag, and an HTML comment. | |
--> | |
<!DOCTYPE html> | |
<!-- Add the appropriate language for your site --> | |
<html lang="en"> | |
<head> | |
<!-- |
// reset <button> | |
@mixin reset-button { | |
margin: 0; | |
padding: 0; | |
background-color: transparent; | |
border: none; | |
cursor: pointer; | |
appearance: none; | |
border-radius: 0; | |
} |
$ npm init or $ yarn init
"scripts": {
"dev": "webpack-dev-server --open",
# .gitignore | |
.DS_* | |
*.log | |
logs | |
**/*.backup.* | |
**/*.back.* | |
.git | |
.sass-cache |