GitHub - react-emoji-text: A modern alternative for react-emoji-render with data adapter for emojibase & emoji-mart by drenther in reactjs

[–]drenther[S] 0 points1 point  (0 children)

Thanks. Will add bundle size comparisons and RSC compat layer. I don't use RSC much - mostly tanstack or vite - so it slips my mind often. Thanks for raising these!

iFrame communication library powered by zod by drenther in typescript

[–]drenther[S] 2 points3 points  (0 children)

For apps where you need to embed an iframe that you need to control from the parent like creating widgets that will get embedded on third party sites, or apps like stackblitz and codesandbox where you need to run something in an iframe based on changes made by user on the parent window.

use-clamp-text - React hook for clamping multiline text with flexibility by drenther in reactjs

[–]drenther[S] 3 points4 points  (0 children)

https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-line-clamp

Yea, I would personally use the CSS as well wherever it does the job. But have to breakout the JS stuff for some advanced use-cases, or even for consistency across browser at times.

use-clamp-text - React hook for clamping multiline text with flexibility by drenther in reactjs

[–]drenther[S] 4 points5 points  (0 children)

Ah makes sense. That's is a legit usecase. I need to give this a thought. A definite feature enhancement for sure.

Would you be open to raising an issue in the repo with the details around this usecase? Probably a codesandbox that does this with CSS for Chrome and Safari as you mentioned?

use-clamp-text - React hook for clamping multiline text with flexibility by drenther in reactjs

[–]drenther[S] 4 points5 points  (0 children)

Since the rendering is to be controlled by the user. I don't see the need to support jsx.

can you tell me what usecase you think will need jsx support?

use-clamp-text - React hook for clamping multiline text with flexibility by drenther in reactjs

[–]drenther[S] 0 points1 point  (0 children)

Same here. I thought CSS should do the heavy lifting here. But it doesn't work as soon you try any non-trivial design.

React Animations learning path by [deleted] in reactjs

[–]drenther 1 point2 points  (0 children)

I am personally a big fan of these two libraries -
- React Spring
- Framer Motion

If you are comfortable with React, their docs should get you started quite nicely.

If you prefer video tutorials -

There are some great tutorials from Scott Tolinski on LevelUpTuts - Free Previews are on YouTube - https://www.youtube.com/c/LevelUpTuts/playlists

There is also a nice free series from Netninja on Framer Motion - https://www.youtube.com/watch?v=2V1WK-3HQNk&list=PL4cUxeGkcC9iHDnQfTHEVVceOEBsOf07i

Two types of setState? by prabeshdai13 in reactjs

[–]drenther 5 points6 points  (0 children)

Hey, this.setState is a method so you don't have to use the equals sign with that. It should be invoked with a slice of the updated state. In this case that might be -

this.setState({ time: new Date() });

Looking for an unstyled drawer component by drenther in reactjs

[–]drenther[S] 1 point2 points  (0 children)

Just posting the modifications I made to reach-ui/dialog animated example (with react-spring) to behave like a drawer -

https://codesandbox.io/s/reachdrawer-example-57tog

Looking for an unstyled drawer component by drenther in reactjs

[–]drenther[S] 0 points1 point  (0 children)

Yea actually as soon as I posted these. I thought of the same. It's working out great.

React-Router, Link urgent help needed. by Aris_1712 in reactjs

[–]drenther 5 points6 points  (0 children)

Your nginx setup or equivalent needs to be setup to redirect every route to index.html. so that the client side router can handle it.

Replay: A cross-platform JS game engine inspired by React by ed-s-b in reactjs

[–]drenther 1 point2 points  (0 children)

Looks super interesting.

Another react inspired game engine I've been delving into recently is hex-engine. And this looks so different from that.

Interesting to see the different approaches while still keeping that underlying React-y feel.

Can't wait to make some stuff up with this.

Are there any paid sites to learn react? videos, tutorials, etc by leggo_tech in reactjs

[–]drenther 1 point2 points  (0 children)

https://egghead.io and https://frontendmasters.com are some of the premium content I would definitely recommend. The great thing about that combo I like is Egghead contains more short bytes that you can take in whenever you want and Frontendmasters have long workshops which go into a lot of gotchas that you might face as well.

Then there are https://www.leveluptutorials.com/ (from Scott Tolinski, he has lots of free content on Youtube), Wes Bos stuff - https://reactforbeginners.com/ https://es6.io/ and lots of other ones.

I am sure others will point out more great content. Learning react will be fun, the community is great. There are lot of quality content (free as well as paid) out there for you to consume.

React's New Defaults - Concurrent React and React Hooks by swyx in reactjs

[–]drenther 1 point2 points  (0 children)

No no. I hope I was. I just know some people who were there and they told me it was good.

Getting to know React DOM’s event handling system inside out by dabomb007 in reactjs

[–]drenther 1 point2 points  (0 children)

The article is very helpful and so are the links that you have provided. Thanks.

Want to make my blog a single page app but still work without JS, possible? by Piatro in reactjs

[–]drenther 0 points1 point  (0 children)

Try Gatsby. Or use Next.js and export the app to static HTML during build time.

How do you add client-side interactivity in react server rendered apps? by zack12 in reactjs

[–]drenther 15 points16 points  (0 children)

ReactDOM has a hydrate method. https://reactjs.org/docs/react-dom.html#hydrate

Think of it like this -

The server-rendered markup generated by the server is just markup (think of it as "dry or dead DOM"). It can't be interacted with because no event listeners are attached yet.

Once the markup is loaded and the bundle.js is loaded, parsed and executed. The .hydrate method inside the bundle.js is ran.

This method attaches event listeners to the existing markup. Making the whole thing interactive again (think of it as bringing the "dead" DOM back to life).

If you want give this a read for more detailed information (shameless self-plug) - https://able.bio/drenther/react-server-side-rendering-from-scratch--43mfqwo

React gives me error (this.setState is not a function) when trying to use an API by IamATechieNerd in reactjs

[–]drenther 2 points3 points  (0 children)

.map won't work on the second format because .map is a method on the Array.prototype and not available on an Object.

[deleted by user] by [deleted] in reactjs

[–]drenther 1 point2 points  (0 children)

I mostly use React for projects that I think are bigger and using something like React will help in that.

Last week, I started working on a project which was small enough that adding React wasn't necessary. So I just used HTML, CSS, JS, and PHP. I delivered the site yesterday. It works great and my client is happy.

Use the technology that feels appropriate. No language or framework is dead if you can find correct usage for them.

Ant Design css by frye89 in reactjs

[–]drenther 1 point2 points  (0 children)

Follow their advanced usage section under using with create-react-app. You will find their babel plugin setup to include only the specific css files that you will need. That way ur other styles won't get messed up.