This style guide outlines the conventions and best practices for developing a React Next.js application using Tailwind CSS, functional components, interfaces, and compound components.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const hello = world(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:16 | |
# Create app directory | |
WORKDIR /usr/src/app | |
# Install app dependencies | |
# A wildcard is used to ensure both package.json | |
# AND package-lock.json are copied | |
# where available (npm@5+) | |
COPY package*.json ./ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def post(self, p: dict, pd: dict, u: str) -> str: | |
Request( | |
pd: pd, | |
p: p, | |
u: u, | |
m: HRMethods.POST, | |
).do() | |
def post(self, params: dict, payload: dict, url: str) -> str: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connection.close() | |
if response.status_code != 200: | |
raise RequestError("Unexpected http response code {}".format(response.status_code)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HttpStatusCodes: | |
SUCCESS = 200 | |
class HttpRequestMethods: | |
POST = "POST" | |
GET = "GET" | |
class HTTPRequest: | |
REQUEST_HEADERS = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HttpClient: | |
def post(params: dict, payload: dict, url: str) -> str: | |
encoded_params = urllib.urlencode(params) | |
headers = { | |
"Content-type": "application/x-www-form-urlencoded", | |
"Accept": "text/plain" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fancy_decorator(func): | |
def wrapper(): | |
return func() | |
return wrapper | |
@fancy_decorator | |
def simple_function(): | |
pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
more_greetings = decorator_hello(decorator_world(more_greetings)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def decorator_hello(func): | |
def wrapper(): | |
print("hello") | |
func() | |
return wrapper | |
def decorator_world(func): | |
NewerOlder