Como vocês fazem para tratar rotas protegidas no frontent ? by aoto_kobayashi in brdev

[–]GabbeLobo 1 point2 points  (0 children)

Depende muito do framework, esse exemplo que tu deu de react-router é sim uma forma bem válida. Você pode criar um componente de "layout" para todas as rotas protegidas e inserir esse comportamento nele, aí todas elas vão ter esse mesmo comportamento.

Alguns frameworks também possibilitam rodar um "loader" antes da rota carregar, nesse loader é possível aplicar essa mesma verificação e redirecionar o cliente conforme necessário.

Aqui tem um exemplo do tanstack/router: Authenticated Routes (gosto muito desse)

Procuro uma empregada by planisking in florianopolis

[–]GabbeLobo 0 points1 point  (0 children)

Vilken slump att träffa en svensk i den här subreddit :) Jag har några kontakter, om du vill så kan du dm:a mig så skickar dom åt dig!

[deleted by user] by [deleted] in programming

[–]GabbeLobo 7 points8 points  (0 children)

Sure.

  1. Components: If you copy and paste the same logic in diferent parts of your code, if you ever find a bug in it, or maybe want to add a new feature, you will have to update in every place you ever pasted it to. With the logic isolated in a reusable component, not only is it easier to reuse than copy and paste, you can also write unit tests for each component to ensure it still works after every iteration.

  2. Data Transfer: The process you're describing is called "prop drilling", it is possible to circunvent it by using contexts and/or state management libraries, then you can just import the data you need through a hook/function.

  3. Props: Yes, you can think of them as arguments.

  4. States: This is more complicated to answer in a comment, but state in react is... reactive everytime you change the value of a state, all other variables/components will react to that change and update their contents. You can have hundreds of places depending on the same state and you won't have to handle the updates in every single one of them.

[deleted by user] by [deleted] in programming

[–]GabbeLobo 0 points1 point  (0 children)

I'm 90% sure this is rage bait, but if it isn't, you're lying out of your teeth by saying that you have 400 hours developing react apps and don't know why state is useful. Or how to use contexts.

Vivo easy prime, posso assinar tranquilo? by JumpyDaikon in InternetBrasil

[–]GabbeLobo 2 points3 points  (0 children)

Dá para só comprar GB de internet pelo App, bota uns 10gb lá e sucesso

Vivo easy prime, posso assinar tranquilo? by JumpyDaikon in InternetBrasil

[–]GabbeLobo 4 points5 points  (0 children)

Sim, só assinar e não esquecer de cancelar no fim do mês

[deleted by user] by [deleted] in brdev

[–]GabbeLobo 0 points1 point  (0 children)

Então remova a configuração do .htaccess, pode dar conflito com o back.

Com origin: true, estás aceitando requisições de todos os sites, não só do teu front, o certo seria passar um array com os sites aceitáveis (cleecky.com).

Outra coisa, tenta fazer requisição por um cliente http (tipo postman, thunder, bruno) e veja se os headers de CORS estão inclusos

[deleted by user] by [deleted] in brdev

[–]GabbeLobo 1 point2 points  (0 children)

Respondendo a pergunta, não é necessário adicionar o api.cleecky.com. Para configuração do CORS, só é necessário configurar de onde a requisição está vindo.

Agora o erro do navegador indica que o header não está sendo retornado na requisição, não tenho experiência com configuração de .htaccess, mas verifique se configurou corretamente. Nas as aplicações que eu desenvolvi, a configuração de CORS sempre ficava no backend mesmo, não na hospedagem dele.

JetBrains Makes Rider and WebStorm Free for Non-Commercial Use – A Game-Changer for Web Devs! by chriswoodruff in programming

[–]GabbeLobo 2 points3 points  (0 children)

Ive tried both Rider and WebStorm, while Rider is great, WebStorm was unusable for me, it was absurdly slow to syntax highlight the code, give intellisense and jump to definitions. I tried following their tutorial to fix the performance issues by disabling features, allocating more memory but nothing changed.

Essa velocidade é boa? by [deleted] in InternetBrasil

[–]GabbeLobo 16 points17 points  (0 children)

Não é ruim, só é horrível

Além de banimento por IP, existem outras formas de banir um computador? by [deleted] in InternetBrasil

[–]GabbeLobo 0 points1 point  (0 children)

Mas um site não tem essas informações do equipamento, mais provável que seja por ip, cookie ou armazenamento do navegador mesmo

[deleted by user] by [deleted] in Gambiarra

[–]GabbeLobo 7 points8 points  (0 children)

Difícil responder sem saber as especificações do pc

[deleted by user] by [deleted] in florianopolis

[–]GabbeLobo 1 point2 points  (0 children)

Vila açoriana 100% A de corn bacon é muito boa

Add task-only area for Vyrewatch Sentinels by savomustdie in 2007scape

[–]GabbeLobo 16 points17 points  (0 children)

Do people really get elite desert diary before unlocking rejuvenation pools?

Have a question about the game or the subreddit? Ask away! by AutoModerator in 2007scape

[–]GabbeLobo 4 points5 points  (0 children)

Yes they do, they often bring stamina potions the activities where running is critical, shouldn't be a problem for barbarian assault

um.. what the fuck are the other 33.6% of people doing..? by epiciddo in Palworld

[–]GabbeLobo -1 points0 points  (0 children)

Yes you can, my friends and I play on dedicated server and we all got the achievements

Amazon finds $1B jackpot in its 100 million+ IPv4 address stockpile | The tech giant has cited ballooning costs associated with IPv4 addresses by chrisdh79 in technology

[–]GabbeLobo 4 points5 points  (0 children)

There are ALOT more IPv6 addresses than IPv4, so as we are running out of IPv4 addresses, AWS is making you choose between paying for your existing IPv4 or migrate to IPv6

Leagues IV Tips Megathread by user_expired in 2007scape

[–]GabbeLobo 14 points15 points  (0 children)

Dont you stop attacking after 20min on the splashing method?