|
worms butthole guy posted:What's the best SFTP / FTP client for Windows? Mac user for many years going to Windows now WinSCP. FileZilla is fine too.
|
# ? Jun 15, 2022 17:10 |
|
|
# ? Jun 4, 2024 15:53 |
|
Sweet thanks all
|
# ? Jun 15, 2022 17:45 |
|
I'm moving from one giant CSS file (compiled from multiple SCSS files), to a styled component approach. When doing that, how do you handle the use case of a third party injecting content that you want to match other components? E.g. it is injecting a <button>, but not using the <button-component> that was made that has all of the styling
|
# ? Jun 15, 2022 17:53 |
|
The Merkinman posted:I'm moving from one giant CSS file (compiled from multiple SCSS files), to a styled component approach. Does said <button> have a way it can be targeted by CSS (i.e. an ID)? If so, you use createGlobalStyle to add a global class that targets the button. https://styled-components.com/docs/api#createglobalstyle
|
# ? Jun 16, 2022 13:50 |
|
Everyone posted:about webhosts Thanks, y'all. Giving DO a look.
|
# ? Jun 16, 2022 15:19 |
|
neurotech posted:Does said <button> have a way it can be targeted by CSS (i.e. an ID)? If so, you use createGlobalStyle to add a global class that targets the button. Oh... shoot I forgot "styled components" was a specific API and not just a general thing. This particular case is in Angular, but I'm sure it could come up in Vue as well.
|
# ? Jun 16, 2022 16:45 |
|
The Merkinman posted:Oh... shoot I forgot "styled components" was a specific API and not just a general thing. This particular case is in Angular, but I'm sure it could come up in Vue as well. I just wrap any library thing I can't access in a styled component and style the internals using selectors. Is hacky but works for me for customizing our company provided components.
|
# ? Jun 17, 2022 21:03 |
|
Hi goons I got a simple question :v i have a react state that I use to set some HTML to be rendered. One thing I can't figure out is how to insert a variable into the string that is already a ternary expression, if that makes sense. I mean I know i could do this with a function call but was hoping it was possible in-line. Is this possible? Here's what i have code:
Thanks!
|
# ? Jun 20, 2022 17:31 |
|
worms butthole guy posted:Hi goons I got a simple question :v I think it could be related to this happening inside a string in that setPinHtml(``) function call. So because it's in a string I don't think you can just use JSX. I think you might want something like: code:
code:
|
# ? Jun 20, 2022 18:22 |
|
Sweeeet thanks prom candy that worked
|
# ? Jun 20, 2022 18:30 |
|
No problem. There may also be a way to actually write out what you want as JSX and then use like ReactDOM.renderToString to turn it into HTML. I haven't had to work with a library like this in a long long time so I don't know what the best way of doing that would be these days but here's something I found on SO that I think is trying to solve the same problem as you. https://stackoverflow.com/questions/37079847/is-it-ok-to-use-reactdomserver-rendertostring-in-the-browser-in-areas-where-reac Doing what you're doing is also probably fine if the HTML you're generating isn't overly complex and annoying to work with.
|
# ? Jun 20, 2022 18:39 |
|
I ended up using some library, ReactHTMLParser to parse it as actual HTML which seems tow ork perfectly and not have to bother with setDangeorusly. But yeah i'm lucky in that it's very simple HTML
|
# ? Jun 20, 2022 19:34 |
|
Is there a reason you're exposing yourself to xss attacks by building html strings instead of rendering your html with React, since you already apparently have React?
|
# ? Jun 21, 2022 16:08 |
|
Chenghiz posted:Is there a reason you're exposing yourself to xss attacks by building html strings instead of rendering your html with React, since you already apparently have React? It looks to me like it's a mapping library that manages the DOM itself
|
# ? Jun 21, 2022 16:18 |
|
I know this is a very dude bro centric profession, but i'm getting tired of the people on StackOverflow who spend more time formatting your questions with list formatting than answering the fukkin questions. Is this a recent thing thats happened with the site? I've noticed alot of elitism also lately over there. I don't doubt it's worth but it can get annoying at times
|
# ? Jun 21, 2022 17:53 |
|
worms butthole guy posted:I know this is a very dude bro centric profession, but i'm getting tired of the people on StackOverflow who spend more time formatting your questions with list formatting than answering the fukkin questions. Is this a recent thing thats happened with the site? I've noticed alot of elitism also lately over there. I finally signed up last week and have been answering some questions, but I can't get any rep cause no one ever votes on answers or accepts them. I'll see dudes come through with 500k rep edit the question like you said, but can't even toss me a vote!!!
|
# ? Jun 21, 2022 17:58 |
|
StackOverflow is pretty much a read-only site for me, but I do toss votes on obscure answers that solve my problem. If I'm asking a question it's usually on SA or in a Discord somewhere.
|
# ? Jun 21, 2022 18:09 |
|
prom candy posted:StackOverflow is pretty much a read-only site for me, but I do toss votes on obscure answers that solve my problem. If I'm asking a question it's usually on SA or in a Discord somewhere. I'll use stack overflow if it comes up in a google search, but I don't ask questions or contribute anymore. What seems to have happened is that in the 2010's, some recruiters were pushing stackoverflow activity (along with github contributions, etc) as a heuristic for whether a dev was worth hiring, and this became a cobra effect that drove down the quality of the site significantly.
|
# ? Jun 21, 2022 18:47 |
|
What do you folks use instead? I know Discord was mentioned, any good channels?
|
# ? Jun 21, 2022 19:33 |
|
camoseven posted:I finally signed up last week and have been answering some questions, but I can't get any rep cause no one ever votes on answers or accepts them. I'll see dudes come through with 500k rep edit the question like you said, but can't even toss me a vote!!! I get thousands of votes from olde PHP questions that are super basic, and less then a dozen for anything actually complicated.
|
# ? Jun 21, 2022 21:04 |
|
MrMoo posted:I get thousands of votes from olde PHP questions that are super basic, and less then a dozen for anything actually complicated. lol yes this. for a couple weeks there I was getting into answering complicated typescript questions just to test my own knowledge and after basically nobody interacted with my answers, i gave up
|
# ? Jun 21, 2022 21:36 |
|
teen phone cutie posted:lol yes this. for a couple weeks there I was getting into answering complicated typescript questions just to test my own knowledge and after basically nobody interacted with my answers, i gave up This is EXACTLY what I was trying to do and exactly what is happening lol
|
# ? Jun 21, 2022 21:39 |
|
worms butthole guy posted:What do you folks use instead? IRC
|
# ? Jun 22, 2022 03:07 |
|
Answering questions commits you to the possibility of being wrong and getting down voted. I think that is why you see so many answers in the comments and people farming rep from formatting stuff and other low risk activities.
|
# ? Jun 22, 2022 08:56 |
|
Bruegels Fuckbooks posted:I'll use stack overflow if it comes up in a google search, but I don't ask questions or contribute anymore. What seems to have happened is that in the 2010's, some recruiters were pushing stackoverflow activity (along with github contributions, etc) as a heuristic for whether a dev was worth hiring, and this became a cobra effect that drove down the quality of the site significantly. Imagine having to convince a recruiter that you're worth hiring. I'd take a technical interview over that any day.
|
# ? Jun 23, 2022 01:53 |
|
philihp posted:Imagine having to convince a recruiter that you're worth hiring. I'd take a technical interview over that any day. It was mostly poo poo like: https://softwareengineering.stackexchange.com/questions/20407/will-high-reputation-in-stack-overflow-help-to-get-a-good-job. Devs used to tell aspiring programmers to do poo poo like contribute to github/stackoverflow etc, and recruiters took those proclamations from the devs, and a legion of unemployable zombies took that to mean that they too could get six figgies tech jobs by changing lowercase to uppercase in documentation on random github repositories if they just did it enough times.
|
# ? Jun 23, 2022 02:04 |
|
Armauk posted:IRC
|
# ? Jun 23, 2022 05:37 |
|
Can anyone recommend a good book (or otherwise) to learn about React? This is meant for a team of developers who have been using React (only functional components and hooks) with Typescript for a little less than a year: something intermediate to advanced to improve our understanding, which is decent enough to get work done but occasionally is still snagged by gotchas, plus we don't have a good handle on reasoning about performance when comparing ways of doing something, etc.
|
# ? Jul 7, 2022 20:54 |
|
Do people write books anymore? I'm not sure if you'll be able to find the info you need neatly organized in one place. If you have questions though , there's a bunch of React devs in this thread.
|
# ? Jul 8, 2022 13:20 |
|
React moves pretty slow, there is probably time to write books.
|
# ? Jul 8, 2022 13:26 |
|
smackfu posted:React moves pretty slow, there is probably time to write books. Ha! Right, this is probably at the core of why it's so hard to find intermediate/advanced resources; anything at that level that begins to approach a canonical resource dies with a few years. I always used to recommend the Dan Ambramov guide to useEffect, but now the React team seems to want to kill useEffect entirely. To the OP—share anything good you find, but once you get past the React basics, you kind of have to keep up with the meta via some combination of Twitter, YouTube, conference talks, and podcasts.
|
# ? Jul 8, 2022 14:48 |
|
prom candy posted:Do people write books anymore? I'm not sure if you'll be able to find the info you need neatly organized in one place. If you have questions though , there's a bunch of React devs in this thread. Work wants us to try our hand at some sort of communal in-depth learning activity (1st suggestion was read a book together and discuss the chapters) as an experiment and React seemed like the best subject since it is the most new of our tools to us. If someone has a series of videos or a collection of blog posts I'm down for that too. Fair enough if no one can recommend anything in that vein; in that case I'll probably just compare the table of contents of a few of the books that pop up when you search 'react books 2022' and pick one just so we've got something to try.
|
# ? Jul 8, 2022 15:11 |
|
fsif posted:I always used to recommend the Dan Ambramov guide to useEffect, but now the React team seems to want to kill useEffect entirely. Are they replacing it with different hooks entirely or what? First I've ever heard of this
|
# ? Jul 8, 2022 15:35 |
|
fsif posted:Ha! Right, this is probably at the core of why it's so hard to find intermediate/advanced resources; anything at that level that begins to approach a canonical resource dies with a few years. I always used to recommend the Dan Ambramov guide to useEffect, but now the React team seems to want to kill useEffect entirely. Do they? They only thing I've heard recently is about the forthcoming useEvent hook. Opulent Ceremony posted:Work wants us to try our hand at some sort of communal in-depth learning activity (1st suggestion was read a book together and discuss the chapters) as an experiment and React seemed like the best subject since it is the most new of our tools to us. If someone has a series of videos or a collection of blog posts I'm down for that too. Fair enough if no one can recommend anything in that vein; in that case I'll probably just compare the table of contents of a few of the books that pop up when you search 'react books 2022' and pick one just so we've got something to try. At my old work we used to do lunch n learns where we'd pile into the conference room and watch YouTube videos. I'm guessing you're probably remote now but there's still ways to watch stuff together right? Maybe there are books out there, I dunno. I haven't bought a programming book in about ten years since online resources have generally been up to date, mostly free, and they don't take up space in my house. I also personally learn much better from videos than just about any other format.
|
# ? Jul 8, 2022 15:43 |
|
Protocol7 posted:Are they replacing it with different hooks entirely or what? First I've ever heard of this "Kill useEffect entirely" was hyperbolic/me speculating wildly based on some recent developments. "Steer people away from using it so frequently" is probably a more accurate way of putting it. As prom candy mentioned, they're looking to introduce a `useEvent` hook to replace a lot of the current `useEffect` implementations. The beta React docs also features a section about using useEffect less. And now in React 18 strict mode, they've been forcing useEffect to run twice, which effectively breaks a lot of common implementations of the hook (like data fetching). So, you know, the React team has kind of been implying that the community has been using useEffect incorrectly for the past four years or whatever and clearly they've been rethinking the paradigm. My assumption is that they are trying to sunset useEffect's role as one of the "main" hooks and relegate to more edge case-y uses.
|
# ? Jul 8, 2022 16:13 |
|
Hmm. That is interesting and I think we did get burned by that React 18 useEffect thing (our app was React 16 initially and we had an initiative to basically update everything to latest versions for security or w/e). Being in web dev is so exciting
|
# ? Jul 8, 2022 16:16 |
|
I have definitely seen people who don’t know React abuse useEffect. They write code that updates a state variable (from useState), then have a useEffect respond to that state change. Ugh.
|
# ? Jul 8, 2022 16:22 |
|
smackfu posted:I have definitely seen people who don’t know React abuse useEffect. They write code that updates a state variable (from useState), then have a useEffect respond to that state change. Ugh. I feel like I "know" React (been using it since the class components days) and I would have thought this was an acceptable use of useEffect until very recently. It has a dependency array and fires off whenever one of the dependencies changes! Why wouldn't I intuit that I could use is like this?
|
# ? Jul 8, 2022 16:40 |
|
fsif posted:And now in React 18 strict mode, they've been forcing useEffect to run twice Well that explains something I've been tearing my hair out over!
|
# ? Jul 8, 2022 17:42 |
|
|
# ? Jun 4, 2024 15:53 |
|
fsif posted:"Kill useEffect entirely" was hyperbolic/me speculating wildly based on some recent developments. "Steer people away from using it so frequently" is probably a more accurate way of putting it. Thanks for this, I just refactored a couple of components in a project to not have useEffect anymore in favor of more efficient methods pointed out in your links
|
# ? Jul 8, 2022 18:29 |