Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add utm params in external urls #120

Merged
merged 5 commits into from
Apr 3, 2024
Merged

Conversation

gupta-ji6
Copy link
Member

@gupta-ji6 gupta-ji6 commented Apr 1, 2024

Description

  1. Added getUrlWithUtmTrackingParams utility function.
  2. Copeid same in issueEmailGenerator.js node script to utilise it in markdown newsletter emails.

Testing

  1. Deployed on preview, working as expected.
  2. For email issue script, generated markdown for issue 17 - worked as expected. sharing output below.
issue17.md

![Headshot](https://og.scriptified.dev/Correct%20usage%20of%20the%20useRef%20hook%2C%20understanding%20HTTP%20Cookies%2C%20a%20JavaScript%20game%20engine%20and%20more.png?issue_number=17&date=March%208%2C%202023)

<center>[Read issue on web](https://scriptified.dev/issues/17?utm_source=scriptified.dev&utm_medium=newsletter)</center>

Watch the behind-the-scenes story of React's development, learn how to correctly use the useRef hook, and gain an understanding of how HTTP cookies work. 

# Tip of the day

When you have an array of key-value pairs that you want to convert into an object, you can use `Object.fromEntries` to directly convert them instead of doing it via something like `reduce`. 

 
```js
const entries = [  ['a', 1],
  ['b', 2],
  ['c', 3]
];

// ❌ Instead of doing it like this:
const obj = entries.reduce((acc, [key, value]) => {
  acc[key] = value;
  return acc;
}, {});
// obj = {a: 1, b: 2, c: 3}

// ✅ Use Object.fromEntries instead:
const obj = Object.fromEntries(entries);
// obj = {a: 1, b: 2, c: 3}

Articles

React useRef Hook for Dummies: How to Use useRef Correctly with Examples

The article breaks down how to use the React useRef hook correctly and explores a few of its different use cases.

by Ammar Ahmed

A practical, Complete Tutorial on HTTP cookies

Learn how HTTP cookies work: simple, practical examples with JavaScript and Python.

by Valentino Gagliardi


Tools

melonJS

melonJS is a fast and lightweight JavaScript game engine, that just relies on the capabilities of an HTML5-supported browser and has multiple features including WebGL 1 & 2 renderer for desktop and mobile devices with fallback to Canvas rendering, Web Audio support with spatial audio, Mouse and Touch device support etc.

by melonJS

Color Review

A color contrast checker with a visualisation that shows exactly where the WCAG thresholds sit

by Anton Robsarve


Tech Talks

React.js: The Documentary

https://youtu.be/8pDqJVdNa44?utm_source=scriptified.dev&utm_medium=newsletter)

React.js: The Documentary brings you the full story behind the early days of React, focusing on the dedicated group of developers who helped bring it to the world stage. This story is told by an all-star cast of developers like Tom Occhino, Christopher Chedeau, Pete Hunt, Sebastian Markbåge, Dan Abramov, and many more.

by Honeypot


Quiz

What’s wrong with the following code snippet?

function MyComponent() {
  const [count, setCount] = useState(0);

  useEffect(() => {
    const intervalId = setInterval(() => {
      setCount(count + 1);
    }, 1000);
    return () => clearInterval(intervalId);
  }, []);

  return (
    <div>
      <p>Count: {count}</p>
    </div>
  );
}

The useEffect hook should not be used with a state update function.

The setCount function should take the previous count value as an argument.

The useEffect hook is missing a cleanup function to clear the interval.

The useEffect hook is missing the count variable in the dependency array


This week in GIF

When they ask me to ship to production as soon as possible and without testing (via https://thecodinglove.com/)

When they ask me to ship to production as soon as possible and without testing (via https://thecodinglove.com/)


Liked this issue? Share on Twitter or read previous issues.


</p>
</details> 

@gupta-ji6 gupta-ji6 self-assigned this Apr 1, 2024
Copy link

changeset-bot bot commented Apr 1, 2024

⚠️ No Changeset found

Latest commit: a0f5977

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@technetium-co technetium-co marked this pull request as ready for review April 1, 2024 17:36
@technetium-co technetium-co requested a review from a team as a code owner April 1, 2024 17:36
@prateek3255 prateek3255 merged commit ad45d8d into main Apr 3, 2024
1 check passed
@prateek3255 prateek3255 deleted the feat/add-utm-params branch April 3, 2024 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants