teleren/devto huggingface dataset:
Dynamic Routes in React
Tags: html, javascript, react, webdev
Published: 2022-09-22 09:03:17

Hello Everyone today i will be discussing about Dynamic Routes in React JS.I will be using react-router-dom library as it is easy to use and flexible and can be used for both client and server side routings

Let's get started...
# Setting the Routing Part -
index.js 
```react
import { BrowserRouter as Router } from 'react-router-dom'
.
.
 <Router>
      <App />
 </Router>
.
.
```
* In your index.js file ,Import the Router component and wrap the App component inside Router component.

# Creating the Routes -
App.js
```react
import React from 'react';
import { Routes, Route, Link } from 'react-router-dom';
import UserDetails from './UserDetails';
import './App.css';

function App() {
  const users = [1,2,3,4,5,6,7,8,9,10];
  return (
    <div className="">
      <div className="mx-20 flex gap-5 my-24">
        {
          users.map((user) => {
            return (
              <Link to={`users/${user}`}>User {user}</Link>
            )
          })
        }
      </div>
      <Routes>
        <Route path="users/:userId" element={<UserDetails />} />
      </Routes>

    </div>
  );
}

export default App;
```
* First we have imported the Routes, Route and Link from react-router-dom.
* Routes is used to wrap all the Route component inside it.
* Route is used to specify which component will be rendered at a particular path or url, path is provided using "path" attribute and component is provided using "element" attribute.
* Link is used to redirect the user to the path provided in the link using "to" attibute.We made the Link dynamic using template string and map the values of user array to the Link componenet with 1-10 number.
* In the Route component "path" attribute , we have used "users/:userId" , ":" colon is used to make the route dynamic and the parameters can be accessed using the name "userId" as provided in the route path after colon.

# Creating the Dynamic component - 
UserDetails.js
```react
import React from 'react'
import {useParams} from 'react-router-dom';

function UserDetails() {
    const {userId} = useParams();
  return (
    <div>
        <h1 className="text-indigo-600 m-12">User {userId}</h1>
    </div>
  )
}

export default UserDetails
```
* We have used useParam hook to access the parameter values from the url.
* as you can see we have used the exact same value "userId" for accessing the value.
* You can check in the output, when you click on any link , the text in the UserDetail component will be changed.

THANK YOU FOR CHECKING THIS POST

You can contact me on -
Instagram - https://www.instagram.com/supremacism__shubh/
LinkedIn - https://www.linkedin.com/in/shubham-tiwari-b7544b193/
Email - shubhmtiwri00@gmail.com

^^You can help me by some donation at the link below Thank you👇👇 ^^
☕ --> https://www.buymeacoffee.com/waaduheck <--

Also check these posts as well
https://dev.to/shubhamtiwari909/js-push-and-pop-with-arrays-33a2/edit

https://dev.to/shubhamtiwari909/tostring-in-js-27b

https://dev.to/shubhamtiwari909/join-in-javascript-4050

https://dev.to/shubhamtiwari909/going-deep-in-array-sort-js-2n90
how to use subject in angular
Published: 2022-09-22 08:54:06

let's implement how to use subject in angular,
first we create 2 component , component1 and component2
this is such as share data among different component, 
via Serrvice,

we will create simple input and share texInput to another component

first we create function in component1.ts

in component ts

```
 enteredText: string;
  clickFun(){
    console.log(this.enteredText)
  }

```

in componenten1.html

```
<div class="container">
  <input type="text" [(ngModel)]="enteredText">
  <button (click)="clickFun()">click</button>
</div>

```


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ydzs9uwocsnsx50839pt.png)

in the top input text in comp1 
and text **comp2 work** from component2

and now create component2

```

<div class="container">
  <p>
    comp2 works! {{inputText}}
  </p>
</div>

```

and in component2 ts

```
  inputText : string

```

and now create service for share data from input component1 into component2


```
datasubject = new Subject<string>();

 shareDataText(data: any) {
    this.datasubject.next(data.toString()); //
  }


```

and dont forget for import Subject from rxjs
if we already create service
now we call the service in the app.module
exactly at providers: [NameService]

let call service in component1

```
  constructor(private dataservice: DataService) { }

```

dont forget to import the service 
and now we create call in our clickbutton function

```
 clickFun(){
    this.dataservice.shareDataText(this.enteredText)
  }
```

and we call the service in component2 


```
 ngOnInit() : void{
    this.dataservice.datasubject.subscribe(value => {
      this.inputText = value
    })
  }

```

and we see when we click input button in component1
data will show in component2


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cvbfibzg1lsierbuiob0.png)
styled-components - avoiding transient props
Published: 2022-09-22 08:38:36

so, I had this error - where the gist is that `react` is throwing an error that 'prop_whatever' is not a know prop (DOM wise).

this is a `styled-components` error in the end.

what was happening was those props where being used, in a logic layer, but, propagated to the underlying VDOM representation of a DOM element, meaning - that said props would "bleed" into the real DOM - no cool.

`.withConfig` to the rescue - basically a chained function exported by the good people at `styled-components` where one of the fields accepts some sort of filter function, to decide wether forwarding this prop will happen or not.

so here's my function:

```react
export function preventTransientPropForwarding(prop: string) {
  return ![/anyPropYouWouldNotLikeToTransfer/].some(regEx => regEx.test(prop);
}
```

and the implementation would simply look like so:

```react
const SomeStyleComponentsComponent = styled(Extended3rdPartyComponent).withConfig({
	shouldForwardProp: (prop) => preventTransientPropForwarding(prop),
})``;
```

although the API will tell you to prefix props with `$` to prevent the propagation, that is still manual.

unfortunately, this is very tedious and manual.

so, here's another solution i've implemented:

basically - you will override the default `styled` object.

```typescript

import _styled, { AnyStyledComponent, ThemedStyledFunction } from 'styled-components';

export function styled(
	element:
		| AnyStyledComponent
		| keyof JSX.IntrinsicElements
		| React.ComponentType<any>
): ThemedStyledFunction<
	typeof element,
	any,
	object,
	string | number | symbol
> {
	return _styled(element).withConfig({
		shouldForwardProp: (prop: any) => !preventPropLeak(prop),
	});
}

```

now, check this out! you get auto-completion out of the box, and you can use 3rd party UI components, and extend them using your function.

the only caveat is, you will no longer be able to do something like `styled.div` but would rather have to conform to `styled('div')`;

why would you do this ?

simple - I'm working with vscode, and i have the styled-components extension that allows me to write emmet css, to code faster and get some auto-completion for my css and not just for component types.

hope you liked this solution !

not my best...but still, works if you need it.
Typescript WTF Moments 8: Type Level Equality Not Working With Intersection
Tags: typescript, webdev, programming, tutorial
Published: 2022-09-22 07:57:00

---
series: Typescript WTF Moments 
---

```ts
export type IsSame<T, U> = (<G>() => G extends T ? 1 : 2) extends <
	G
>() => G extends U ? 1 : 2
	? true
	: false

type A = IsSame<{a:1, b:2},{a:1, b:2}> // true
//   ^?

type B = IsSame<{ a:1, b:2 },{ a:1 } & { b:2 }> // false
//   ^?
```

Background: [Type Level Equality](https://stackoverflow.com/questions/53807517/how-to-test-if-two-types-are-exactly-the-same)

[playground](https://www.typescriptlang.org/play?#code/KYDwDg9gTgLgBDAnmYcCSBnAygQwLbAA8AKgDRwCqAfHALxwAUhA4lQwJR03NygzAA7ACYY4xOAH44ARjgAuOACZOfQSLiEAsACgAkMx1tOtbrxD9hoipJnylO3VJhQArsAcKAZjgA2Gd9o6SChwAIJ06Nj4RADeOHLS5ABGcooAvqRxCcmpaTQA9PkIrgGFcOUAehI6QcioAEIRmLgEhDFw8YlwKYpwGe2dfXAAZHDtPX0FRd5+pUWVEkA)

Solution:
```ts
export type IsSame<T, U> = (<G>() => G extends T ? 1 : 2) extends <
	G
>() => G extends U ? 1 : 2
	? true
	: false

export type ReMap<T> = T extends Record<string, unknown>
	? { [Key in keyof T]: T[Key] }
	: T

type A = IsSame<{ a:1, b:2 }, { a:1, b:2 }> // true
//   ^?

type B = IsSame<ReMap<{ a:1, b:2 }>, ReMap<{ a:1 } & { b:2 }>> // true
//   ^?

```
[playground](https://www.typescriptlang.org/play?#code/KYDwDg9gTgLgBDAnmYcCSBnAygQwLbAA8AKgDRwCqAfHALxwAUhA4lQwJR03NygzAA7ACYY4xOAH44ARjgAuOACZOfQSLiEAsACgAkMx1tOtbrxD9hoipJnylO3VJhQArsAcKAZjgA2Gd9o6oJCwCMioAErAALI4YCQ09OKqlnBRAMbQQoQYzgCWAgDm5C4CANYCEADuAlQOUgDecADaANLAiHAFcGUdEJ5iALoKxG0dg3AAvh5iOjpIKHAAgnTo2PhETThy0uQARnKKU+RbO-uHUzQA9FcIrgE3cE8AehJz2guoAEKrmLgEhCisXip12cAOR0mVHIQLihFBUzgADI4E0IZdrrdnG4dI8Xm9tEA)

Combine `Remap` and `IsSame`
Why should you choose clone scripts for launching the OTT platform?
Tags: ottplatformdevelopment, ottappdevelopment, ottdevelopment
Published: 2022-09-22 08:30:36

OTT platforms have impacted the entertainment industry and made people access their favourite movies and shows in the comfort of their time and place. This paves the way for many new OTT platforms in the market. Launching an OTT platform can yield more profits and the Development of the OTT platform has two ways. First, develop from scratch. It will add to the expenses of the technology stack, resources, time, and deployment. Second, by using a clone script. Now, what is a clone script, Clone scripts are ready to deploy scripts. They are developed based on the existing apps' workflow, user interface, and success. Some of the OTT clone scripts are Netflix, Disney+, and Hulu, Let us look into the benefits of the clone scripts.

- Bug-Free: Clone scripts are meticulously tested so they are bug-free.
- Customizable: Clone scripts are easily customizable according to our business requirements.
- Scalable: Clone scripts can grow along with your business. So, we don’t have to worry about the upgrade.
- Low Cost: Still, they are developed with high-end tools, very affordable. According to our requirement cost of the development may vary from low to moderate.
- Quick launch:  They are put right from errors and user interface issues. So, the launching time will be within a week.
- High Success Rate: Undoubtedly, the success rate of the clone scripts is high for the reason that they are error-free and have a nice user interface.

If you are keen on starting an OTT business instantly with a low budget, the OTT App clone script is the finest solution. To the degree that the most in-demand FireColours is a provider of OTT clone scripts. They provide end-to-end support throughout the deployment. They offer the best OTT App clone script at an appropriate price, with fully personalized and a variety of ROI features.
How to Get Unbanned From Roblox?
Published: 2022-09-22 08:25:44

It's easy enough to get unbanned from Roblox these days!

Even though Roblox has a very friendly and helpful fan base, there are rules that need to be followed to keep accounts from being banned.

If you want to play this game but find out that someone wrongly banned you, you need to find a good way to get unbanned from roblox.

Don't worry!

If you are facing the exact same situation, then read this guide till the end and you will have better solution to [get roblox unblocked](https://amitbiwaal.com/unblocked-roblox-at-school).

## Your Roblox account was unbanned; why?

Your account was banned for the first time because you did not follow Roblox's Terms and Players Privacy Rules. [Click here](https://en.help.roblox.com/hc/en-us/articles/115004647846) to go to the official Roblox site for more information about this topic.

> If you change the name of a group on Roblox to something that other players might find offensive, Roblox will send you a message so you can make a new name. If you don't listen to this warning, your account will be banned from the game.

## How to Get Unabnned From Roblox With VPN?

If your appeal didn't work, you should know that it's not hard to get around a ban with a Roblox VPN. Just follow the steps below, and you'll be able to play as usual.

**Here's how to use a VPN to get unbanned from Roblox:**

- First, sign up with a VPN service you can trust. I especially think you should use [NordVPN](https://go.nordvpn.net/aff_c?offer_id=15&aff_id=70299) **(3 Months free)**
- The VPN app that works with your device can now be downloaded and installed.
- Make sure you remove Roblox from your device and delete all of its files before you use the VPN.
- Turn your device back on, and then open the VPN app. To get a new IP address, connect to a server in the country you want.
- Reinstall Roblox from scratch. Create a new account (and be sure to use a different email address and username).
- Have fun with the game now.

**_But here is tough deal._**

With so many VPNs to choose from, you may be wondering what sets the ones in this post apart. Here's a quick rundown of some of the most important things we look for in a VPN for use with Roblox:

- Servers in dozens of countries all over the world.
- Fast speeds so you can game without lag.
- Strong security can protect you from DDoS attacks.
- A no-logs policy is a way to protect people's privacy.
- Live chat and email support are available around the clock.
- Multiple simultaneous connections (at least five).

## Final Words - Get Unbanned From Roblox

That is everything there is to know about being unbanned from Roblox. 

Please let me know in the comments section below if there are any questions that you have. And thank you for taking the time to read this!
Which is better, Azure Data Factory or SSIS?
Tags: azure, azuredatafactory, etl, dataintegration
Published: 2022-09-22 08:23:27

## Which is better, Azure Data Factory or SSIS?

SSIS is an ETL tool for on-premises use that may also be used for ELT. ADF is a cloud-based solution for constructing ELT data pipelines. Implementing ETL use cases in ADF is also feasible using the data flow features

Experts recommend using Azure Data Factory as your preferred choice for a data movement orchestration tool. If you’re happy with your present SQL Server Integration Services workloads, remember that you can still run them with Azure Data Factory.

**Read more:**[Which is better, Azure Data Factory or SSIS?](https://www.anblicks.com/blog/azure-data-factory-a-contemporary-solution-for-modern-data-integration-challenges)
How are you doing?
Tags: books, apple, doors, javascript
Published: 2022-09-22 08:21:41

## Greetings


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j5p5b7dhmjr8n7tg1dcp.jpg)

Hi **everyone**, are you fine?
what's going on? 

1. one 
2. two 
3. three

- one
- two
Penpot, the best open-source alternative to Figma & Adobe XD
Tags: opensource, elestio, penpot
Published: 2023-10-11 12:15:45

---
title: Penpot, the best open-source alternative to Figma & Adobe XD
published: true
date: 2022-09-22 08:18:38 UTC
tags: opensource, elestio, penpot
canonical_url: https://elestio.hashnode.dev/penpot-the-best-open-source-alternative-to-figma-adobe-xd
---

Were blown away by the team at Kaleidos. Committed open-sourcers like us, theyve developed the very popular open-source project management tool Taiga. But today we want to tell you about Penpot (16K stars on github), a phenomenal collaborative design tool.

Penpot, an open-source alternative to Figma, is a design tool for creating websites, software interfaces and other visual projects. It is a web-based application that allows designers to create visually rich and interactive prototypes without any coding skills. It has been built to make the designers life easier by providing all the key tools in one place. We love it, and we think you will too! [Check it out here on Elestio.](https://elest.io/open-source/penpot?ref=blog.elest.io)

**Latest update** : Adobe acquired Figma for $20B and [users are concerned](https://www.creativebloq.com/news/adobe-buys-figma?ref=blog.elest.io).

### Penpot Benefits

1. Intuitive & Fast UI
2. Export to SVG, PNG, JPG
3. Real-time collaborative experience
4. Be able to create & share prototypes
5. Open-source with an active community
6. Can be fully self-hosted

### Penpot demo video
<iframe src="https://www.youtube.com/embed/JozESuPcVpg?feature=oembed" width="700" height="393"></iframe>
### Use cases

1. Create web design for sites & e-commerce
2. Create desktop & mobile application design
3. Create flyers, cards, anything to print
4. Create visuals for social medias
5. Create interactive prototypes without code

### Self-hosting

Some companies prefer to self-host everything for various reasons (data ownership, compliance, ), for them one of the simplest and safest ways to do that is with Elestio.

### Deploy your own Penpot to any cloud

With Elestio, deploys Penpot on any cloud or on-premise in 3 minutes. You can relax knowing that we are taking care of installation, configuration, updates, security and backups.

### Quickstart with Penpot

Once your service is deployed, you can get your admin credentials from your Elestio dashboard and start to use Penpot directly.

Penpot community has created 19 free templates to help you quickly start your designs and prototypes. Download and import the template/library you like into your Penpot project and enjoy!

Click on the button below to get a [fully managed instance of Penpot](https://dash.elest.io/73/elestio/services/creation?tempID=121&ref=blog.elest.io) ready to use in a few minutes, its covering setup, security, backups, DNS, SMTP, monitoring, alerts, migrations, software updates and a team of Linux experts and open source enthusiasts to ensure your services are always safe, UP and running.

_Originally published at_ [_https://blog.elest.io_](https://blog.elest.io/penpot-probably-the-best-open-source-alternative-to-figma/) _on September 22, 2022._
new 3
Published: 2022-09-22 07:55:58


Savvy tech OnePlus will divulge the 10 cell phones. OnePlus is [dealing with a cutting edge](https://jobily.net/) cell phone,
 the approaching cell phone will be in a tenth series of telephones. This is a lead gadget of the organization and will
[ be called OnePlus 10. The cell phone](https://jobily.net/) will be fueled by one of the most recent chipsets accessible
 [for cell phones in the market ](https://jobily.net/)
that is called Qualcomm Snapdragon 8 Gen1. Likewise, there is a strong GPU of Adreno 660.
[https://jobily.net/](https://jobily.net/)
new post 2022
Published: 2022-09-22 07:54:52


Savvy tech OnePlus will divulge the 10 cell phones. OnePlus is dealing with a cutting edge cell phone,
 the [approaching cell phone will](http://umobileprice.com/) be in a tenth series of telephones. This is a lead gadget of the organization and will
 [be called OnePlus 10. The cell phone will](http://umobileprice.com/) be fueled by one of the most recent chipsets accessible
 for cell phones in the market 
that is called Qualcomm Snapdragon 8 Gen1. Likewise, there is a strong GPU of Adreno 660.
[http://umobileprice.com/](http://umobileprice.com/)
10 Top Laravel Packages for immediate and advanced programmers
Published: 2022-09-22 07:54:50


Today I will share the top 10 laravel packages that every junior, immediate, and advanced Laravel Programmer should understand and be able to implement.

My analysis is based on their online rating and git stars.

**Intervention/Image**

Intervention/Image package enables developers to generate, edit, and attractively change images. Developers are free to utilize the open-source package however they see fit. Run these commands to install the aforementioned package:

_composer require intervention/image_

**Laravel GraphQL**

You will adore how Laravel’s GraphQL package functions if you are used to the idea of employing classic REST architecture. Developers may more easily specify their server architecture and use GraphQL within their apps thanks to GraphQL, which was created as the data query language.

_composer require rebing/graphql-laravel_


**No Captcha**

The No Captcha Laravel Packages were created with the necessity to prevent spamming operations in mind. The package implements Google reCaptcha’s security and verification measures. the only

**Laravel Backup**

Create a robust backup of all your data files with this exclusive package, Laravel Back-up. Keeping in mind the need to have the data stored and backed up, developers have designed the Laravel Backup package that creates a zip file of the application along with the data stored within it. The package gives the flexibility to store them in any of the systems.

_composer require spatie/laravel-backup_

**Laravel User Verification**

Creating a website, registering users, and including an embedded email validation form. This is what the Laravel User Verification Package does. Every time a user clicks for verification, it is built in such a way that it can store and handle validation tokens.

_composer require jrean/laravel-user-verification_

**Spatie**

Spatie package just serves to enable you to integrate roles and permissions into your application. Given the security and viability, setting up numerous roles and admin authority on specific actions within your website or application is crucial. You can utilize a variety of Laravel Admin Templates. Although you can manually provide admin access, the Spatie Laravel Packages make it simple to push responsibilities.

_composer require spatie/laravel-permission_


**Laravel Meta Manager**

Utilizing Laravel Meta Manager can help your website rank higher on the first page of search results by enhancing its SEO.

It focuses on the Meta tags for the application and helps you edit them in line with SEO best practices. The package comes with several Meta tags, including standard SEO, Dublin Core, Google Plus, Facebook Open Graph, and many others.