gpt4 book ai didi

How Do I create UNIQUE url for each profile(如何为每个配置文件创建唯一的URL)

转载 作者:bug小助手 更新时间:2023-10-25 13:27:20 28 4
gpt4 key购买 nike



How do I create a unique URL for Each Profile I have ABSOLUTELY No Idea What to do Here If I want to make a unique URL literally ANYTHING but It should be like localhost:3000/Profile/The-url and it should be totally random it SHOULD not be same I know It is not an error but I have NO Idea What do here. I am using React, and I have a database setup in Firebase it is the Firestore database If you WANT anything any questions this question please please give me details because I have No Idea what to do.

我如何为每个配置文件创建一个唯一的URL我绝对不知道在这里做什么,如果我想做一个唯一的URL字面上的任何东西,但它应该是像本地主机:3000/配置文件/-url,它应该是完全随机的,它不应该是相同的,我知道这不是一个错误,但我不知道在这里做什么。我正在使用REACT,我在Firebase中有一个数据库设置,这是FiRestore数据库,如果你有任何问题,请给我详细信息,因为我不知道该怎么做。


I tries to use useParams() sorry if spelling mistake and I also Tried to search in the web I definitely found some help but I didn't find exactly what do

我尝试使用useParams(),如果拼写错误,对不起,我还尝试在Web上搜索,我确实找到了一些帮助,但我没有找到确切的帮助


All the research I have:

我所拥有的所有研究成果如下:


StackOverflow1
JotForm
Quora
stackexchange
stackoverflow2

StackOverflow 1 JotForm Quora StackExchange堆栈溢出2


This is all That I found Helpful.

这就是我发现的所有有用的东西。


更多回答
优秀答案推荐

here is few ideas :

以下是一些想法:


you can create urls like this localhost:3000/profile/profile-id profile id may be guid or insert id of database.

您可以创建这样的URL:LOCALHOST:3000/PROFILE/PROFILE-ID配置文件ID可以是数据库的GUID或插入ID。


更多回答

can you please explain guid or insert ID and can you give a snippet of code, for that?

你能解释一下GUID或插入ID吗?你能给出一段代码吗?

and how to get insert id of the database

以及如何获取数据库的插入ID

guid is 128-bit number used to uniquely identify objects you can create and save when you creating user,I mention primary key of your database entry as insert id

GUID是128位数字,用于唯一标识您在创建USER时可以创建和保存的对象,我将数据库条目的主键称为INSERT ID

Just One thing more like If I want <Link to="/Profile/id" className="ml-1 mt-4 no-underline text-black"> to got to the id so How do I get the id? If got then How Should I store it?

还有一件事,如果我想得到id,那么我怎么得到id?如果有,我应该如何储存它?

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com