A Faster Approach to Enum Props in React

A Faster Approach to Enum Props in React

Create quick interfaces for your React components through powerful TypeScript definitions
TypeScript
React
Enums
Practices

Enums are one of the few features TypeScript adds to JavaScript beyond type checking. Combined with React enums are extremely useful in designing component interfaces.imageLets say were designing a text component in React. Well want different types of text so well add a prop to our component called type. Only certain typ...

Automating Lambda Schema Validation with TypeScript

Automating Lambda Schema Validation with TypeScript

Enforce and document your API's query and body params at runtime using TypeScript
TypeScript
Lambda
AJV
typescript-json-schema
SAM

API validation is essential to running a backend. Especially with tools like NoSQL databases it is up to the APIs business logic to enforce typing. Without these type checks security vulnerabilities can be introduced. Using TypeScript with Lambda is already awesome. Node.js is one of the fastest runtimes on AWS Lambda to cold start. Node.js also supports one of AWSs most mature SDKs.ima...

Handling Stale State from Scheduled Functions in React

Handling Stale State from Scheduled Functions in React

Avoid creating stale closures with setTimeout() and setInterval() by using hooks to reference your logic
React
State Management
Custom Hooks
JS Pass by Value
TypeScript

imageThe React Hooks API is widely becoming popular among the React community. Hooks enable components to supports features like state without needing to be written as a class.However hooks will sometimes act differently than expected. One common problem with useState hooks is the state not appearing to update in scheduled functions...

A Guide to Next.js and Serverless on AWS

A Guide to Next.js and Serverless on AWS

Considering serverless for your Next.js website? Learn if its the best choice and how to implement
Next.js
Serverless
Lambda
Cold Start
AWS Billing
Archeteture

imageNext.js provides a ton of powerful features on top of React. With the ability to server side rendercontent Next.js gives you a fast website with great SEO.SSR also complicates your deployment strategy. With static websites like from Create React App or Next.js static...

Verifying SES Email Domain and DKIM Tokens in CloudFormation

Verifying SES Email Domain and DKIM Tokens in CloudFormation

Use custom resources to circumvent SES restrictions in CloudFormation and keep your IAC
SES
CloudFormation
IAC
CF Custom Resources

imageTo send emails through SES AWS requires you to verify your email domain. Youre also required to create DKIM tokens to authenticate your emails. DKIM tokens help email clients detect malicious emails like spoofed addresses or phishing scams.If youre provisioning your next project with CloudFormation AWS currently doesnt offer any first party solut...

Port Forwarding WSL 2 to Your LAN

Port Forwarding WSL 2 to Your LAN

Run a public server from WSL thats accessible on your local network
WSL
PowerShell
Networking

imageThe Windows Subsystem for Linuxis great for development. WSL gives you the functionality of UNIX with only a fraction of the resources required for a traditional VM. It also runs alongside your Windows environment allowing you to access Windows files inside Linux. Microsoft continues to improve WSL like with the r...

How to Track Airplanes with your own ADS-B Receiver

How to Track Airplanes with your own ADS-B Receiver

Use a Raspberry Pi to track local flights and get rewarded for doing so
ADS-B
Aviation
Raspberry Pi
Antennas
FlightRadar24
FlightAware

Ever wondered how airplanes are tracked? Traditionally planes have been tracked with radar but limitations like weak oceanic coverage make radar not the best solution. However a new technology called Automatic Dependent Surveillance–Broadcast is emerging as the new standard for aviation tracking. What is ADS-B?Imagehttpsshop.jetvision.deWebRootStoreShopsMed...

How to solve SAM 403 Errors on CORS Preflight

How to solve SAM 403 Errors on CORS Preflight

The answer might be easier than you think: your OPTIONS method might be requiring authentication
API Gateway
SAM
CORS
CloudFormation

If your browsers CORS preflight request is responding with a your APIs OPTIONS method could be requiring authentication. This might sound okay if your API is authenticated but the OPTIONS method behaves differently than other HTTP methods. Your API server will need to comply with the CORS standard which requires OPTIONS methods to work without authentication headers. How do CORS pref...