Skip to content

Commit 1b36c06

Browse files
Update gems; write a post (#18)
Co-authored-by: Evan Freeman <efreeman@hubspot.com>
1 parent 0c3246d commit 1b36c06

File tree

3 files changed

+117
-36
lines changed

3 files changed

+117
-36
lines changed

Gemfile.lock

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,46 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (5.2.6)
4+
activesupport (5.2.8.1)
55
concurrent-ruby (~> 1.0, >= 1.0.2)
66
i18n (>= 0.7, < 2)
77
minitest (~> 5.1)
88
tzinfo (~> 1.1)
9-
addressable (2.8.0)
10-
public_suffix (>= 2.0.2, < 5.0)
11-
autoprefixer-rails (10.3.3.0)
9+
addressable (2.8.1)
10+
public_suffix (>= 2.0.2, < 6.0)
11+
autoprefixer-rails (10.4.13.0)
1212
execjs (~> 2)
1313
colorator (1.1.0)
14-
concurrent-ruby (1.1.9)
15-
em-websocket (0.5.2)
14+
concurrent-ruby (1.2.2)
15+
em-websocket (0.5.3)
1616
eventmachine (>= 0.12.9)
17-
http_parser.rb (~> 0.6.0)
18-
ethon (0.15.0)
17+
http_parser.rb (~> 0)
18+
ethon (0.16.0)
1919
ffi (>= 1.15.0)
2020
eventmachine (1.2.7)
2121
execjs (2.8.1)
2222
extras (0.3.0)
2323
forwardable-extended (~> 2.5)
24-
fastimage (2.2.5)
25-
ffi (1.15.4)
24+
fastimage (2.2.6)
25+
ffi (1.15.5)
2626
forwardable-extended (2.6.0)
27-
html-proofer (3.19.2)
27+
html-proofer (4.4.3)
2828
addressable (~> 2.3)
2929
mercenary (~> 0.3)
30-
nokogumbo (~> 2.0)
31-
parallel (~> 1.3)
30+
nokogiri (~> 1.13)
31+
parallel (~> 1.10)
3232
rainbow (~> 3.0)
3333
typhoeus (~> 1.3)
3434
yell (~> 2.0)
35-
http_parser.rb (0.6.0)
36-
i18n (0.9.5)
35+
zeitwerk (~> 2.5)
36+
http_parser.rb (0.8.0)
37+
i18n (1.12.0)
3738
concurrent-ruby (~> 1.0)
38-
jekyll (3.9.1)
39+
jekyll (3.9.3)
3940
addressable (~> 2.4)
4041
colorator (~> 1.0)
4142
em-websocket (~> 0.5)
42-
i18n (~> 0.7)
43+
i18n (>= 0.7, < 2)
4344
jekyll-sass-converter (~> 1.0)
4445
jekyll-watch (~> 2.0)
4546
kramdown (>= 1.17, < 3)
@@ -69,38 +70,36 @@ GEM
6970
jekyll (>= 3.7, < 5.0)
7071
jekyll-watch (2.2.1)
7172
listen (~> 3.0)
72-
kramdown (2.3.1)
73+
kramdown (2.4.0)
7374
rexml
7475
kramdown-parser-gfm (1.1.0)
7576
kramdown (~> 2.0)
76-
liquid (4.0.3)
77+
liquid (4.0.4)
7778
liquid-tag-parser (1.9.0)
7879
extras (~> 0.3)
7980
liquid (>= 3.0, < 5.0)
80-
listen (3.7.0)
81+
listen (3.8.0)
8182
rb-fsevent (~> 0.10, >= 0.10.3)
8283
rb-inotify (~> 0.9, >= 0.9.10)
8384
mercenary (0.3.6)
84-
mini_magick (4.11.0)
85-
mini_portile2 (2.6.1)
86-
minitest (5.14.4)
87-
nokogiri (1.12.5)
88-
mini_portile2 (~> 2.6.1)
85+
mini_magick (4.12.0)
86+
mini_portile2 (2.8.1)
87+
minitest (5.17.0)
88+
nokogiri (1.14.2)
89+
mini_portile2 (~> 2.8.0)
8990
racc (~> 1.4)
90-
nokogumbo (2.0.5)
91-
nokogiri (~> 1.8, >= 1.8.4)
92-
parallel (1.21.0)
91+
parallel (1.22.1)
9392
pathutil (0.16.2)
9493
forwardable-extended (~> 2.6)
95-
public_suffix (4.0.6)
96-
racc (1.6.0)
97-
rack (2.2.3)
98-
rainbow (3.0.0)
99-
rb-fsevent (0.11.0)
94+
public_suffix (5.0.1)
95+
racc (1.6.2)
96+
rack (2.2.6.3)
97+
rainbow (3.1.1)
98+
rb-fsevent (0.11.2)
10099
rb-inotify (0.10.1)
101100
ffi (~> 1.0)
102101
rexml (3.2.5)
103-
rouge (3.26.1)
102+
rouge (3.30.0)
104103
safe_yaml (1.0.5)
105104
sass (3.7.4)
106105
sass-listen (~> 4.0.0)
@@ -113,11 +112,12 @@ GEM
113112
thread_safe (0.3.6)
114113
typhoeus (1.4.0)
115114
ethon (>= 0.9.0)
116-
tzinfo (1.2.9)
115+
tzinfo (1.2.11)
117116
thread_safe (~> 0.1)
118117
uglifier (4.2.0)
119118
execjs (>= 0.3.0, < 3)
120119
yell (2.2.2)
120+
zeitwerk (2.6.7)
121121

122122
PLATFORMS
123123
ruby
@@ -138,7 +138,7 @@ DEPENDENCIES
138138
uglifier
139139

140140
RUBY VERSION
141-
ruby 2.6.3p62
141+
ruby 2.7.7p221
142142

143143
BUNDLED WITH
144144
2.1.4
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
layout: post
3+
title: "Introduction to TypeScript: Why Should You Use It for Your Next Project"
4+
description: This article takes about what typescript is and why you should use it in your next project.
5+
---
6+
7+
TypeScript is a popular open-source programming language that is a superset of JavaScript. It was developed by Microsoft and released in 2012. TypeScript adds optional static typing, classes, and interfaces to JavaScript, making it a more scalable and maintainable language.
8+
9+
In this blog post, we will explore the benefits of using TypeScript and why it is a great choice for your next project.
10+
11+
#### 1) Type Safety
12+
13+
One of the biggest advantages of using TypeScript is type safety. With TypeScript, you can catch errors during compile time rather than during runtime, which saves a lot of time and effort. You can catch type-related errors like undefined, null, or missing properties before deploying your code.
14+
15+
#### 2) Code Maintainability
16+
17+
TypeScript makes it easy to maintain and refactor codebases, especially for large-scale projects. As your project grows, it becomes more challenging to maintain your codebase, but TypeScript provides features like classes, interfaces, and modules to help structure your code. It helps to write better-organized, readable, and maintainable code.
18+
19+
#### 3) Improved Productivity
20+
21+
TypeScript makes coding faster and more efficient. With TypeScript, you get features like auto-completion, code highlighting, and better documentation, which makes coding easier and faster. You can easily navigate and understand the codebase, which improves productivity.
22+
23+
#### 4) Compatibility with Existing JavaScript Code
24+
25+
TypeScript is designed to be compatible with existing JavaScript code. You can start using TypeScript in your project without making any significant changes to your existing codebase. TypeScript is a superset of JavaScript, so you can still use all the features of JavaScript in your TypeScript code.
26+
27+
#### 5) Better Collaboration
28+
29+
TypeScript provides better collaboration between team members. Since TypeScript code is more structured and maintainable, it's easier for developers to work together. TypeScript also provides better documentation and error reporting, which makes it easier for developers to understand and fix issues.
30+
31+
#### Conclusion
32+
33+
TypeScript is a powerful programming language that adds static typing and other
34+
features to JavaScript. It improves code maintainability, productivity, and
35+
collaboration between team members. TypeScript also provides type safety, which
36+
catches errors during compile time rather than during runtime. These benefits
37+
make TypeScript a great choice for your next project.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
layout: post
3+
title: "Taming the Text Fields: Mastering Controlled Inputs in React"
4+
description: "Wrangle those rogue input fields in your React app with the Controlled Input pattern! This guide equips you to keep
5+
user input under control, ensuring a smooth and secure development experience."
6+
---
7+
8+
9+
**Tired of rogue input fields running wild in your React app?** Enter the Controlled Input pattern, your knight in shining armor (or at least a well-organized React developer).
10+
11+
This pattern keeps your input fields in check by:
12+
13+
* **Storing the current value of the field in the component's state.** Think of it like a high-security vault for your user's precious keystrokes.
14+
* **Using an event handler to update the state whenever the user types something new.** This keeps React informed and prevents any unauthorized changes.
15+
16+
**Why choose Controlled Inputs? It's like having a well-trained guard dog for your data:**
17+
18+
* **Predictable and Readable Code:** Everything is under React's control, making your code cleaner and easier to understand.
19+
* **Dynamic Updates:** React instantly updates with the latest input, keeping your UI in sync and feeling responsive.
20+
* **Easy Validation:** You can effortlessly check if the user's input meets your criteria before it wreaks havoc.
21+
22+
**Compared to Uncontrolled Inputs (the wild west of development):**
23+
24+
Uncontrolled inputs are like leaving the town gates wide open – anything goes! It's messy and unpredictable.
25+
26+
**So next time you need to handle input fields, choose the Controlled Input pattern and keep your React app safe and sound.**
27+
28+
This example code showcases the Controlled Input pattern in action:
29+
30+
{% highlight javascript %}
31+
import React, { useState } from "react";
32+
33+
function ControlledInput() {
34+
const [inputValue, setInputValue] = useState("");
35+
36+
const handleChange = (event) => {
37+
setInputValue(event.target.value);
38+
};
39+
40+
return <input type="text" value={inputValue} onChange={handleChange} />;
41+
}
42+
{% endhighlight %}
43+
44+
Let me know if you have any other questions about Controlled Inputs, or if you'd like to explore some other fun ways to manage your React components!

0 commit comments

Comments
 (0)