Is there a standalone version of the new react-dom package? - reactjs

The title says it all. Since 0.14 (yesterday) ReactJS has been split into react and react-dom packages (for good reason).
For goofy reasons, I'm loading react with AMD. This has worked up until now using their standalone version on the downloads page, but even though they've updated this page to point to v0.14.0, they don't have a standalone version of react-dom.
Is this on it's way? Is there some other way to include react/react-dom with AMD?
Thanks.

Ah. Looks like it's up here on cdnjs. Should have looked their first.

Related

Using ThreeJS with React v16

I am trying to render 3D files in my react project. I am using ThreeJS for my react project of version 16.13.1. After installing #react-three/fiber & #react-three/drei these packages, I am getting error of Module not found: Can't resolve 'react-dom/client'. After searching solution for this I get to know that for these we have to upgrade React version to 17 or above. I did it in demo project & it worked. But the restriction is that I can not update actual project version from 16 to 18 as it will change or break so many things as well as I have to take care of other dependencies. Is there any solution available for using ThreeJS with React v16.
Or if there is any other way or different packages available to render 3D files (like .glb, .gltf) please share with me.
Thank you in advance.
How to find a version of a library that supports particular version of react?
Google <library-name> npm
Go to npm page
Go to repository (usually github)
Open package.json
Check version of react; if it's matching your version go to 7.
Change tag to some previous version; go to 5.
#react-three/fiber & #react-three/drei for react 16.13.1
These two should work:
#react-three/fiber 4.2.21
#react-three/drei 3.2.0
npm install #react-three/fiber#4.2.21 #react-three/drei#3.2.0
Disclaimer
You can never know if the packages work without trying. Many things changes and bug fixes only apply to the newest versions.
I found one package react-3d-viewer to render 3D files which perfectly work for me.
Google model viewer also works and it comes with variety of props which is good for customization of rendered 3D model.
https://github.com/dwqdaiwenqi/react-3d-viewer
https://modelviewer.dev/docs/index.html

Using Nextjs components in a package consumed by a nextjs application

I have a Nextjs website that consumes a package with a set of react components. This package has nextjs installed too but its extremely heavy and only used for next links. I am working on removing nextjs from the package.
Is there a way I can use the next link component in the package without adding next as a dependency. It seems strange to add it in both. I would like to know the recommended approach.
Thanks
This shouldn't be an issue. Nextjs should only get installed once. All new installations with override any previous installation. To avoid conflicts, just make sure your project and package have the same versions of react.

Issue installing react-reveal

I am new to react and I am even newer to typescript. I am working on this project right now and I need to use this specific git repository which is a typescript project. I want to add react-reveal so I can have some cool animations on my website but I get this error message.
I am not sure why this specific library is not working because I have installed other librarys like reactstrap. If anyone could give me any information on how to get this to work or why this isn't working it would be much appreciated!
React-reveal doesn't seem to be actively maintained as it was last updated on August 2018.
Based on the error you received it looks that there is a library that is explicitly configured to only work with React v15 or v16. You could use a slightly older version of React that works with react-reveal. You're using React 17.0.2. You could try using React v16.14.0.
You could also follow the instructions in the error message - using the force option. Here is a link(npm: When to use `--force` and `--legacy-peer-deps`) that describes how that works.
A better way to go is search for a more popular actively maintained alternative like react-spring(https://react-spring.io/) or react-awesome-reveal(https://www.npmjs.com/package/react-awesome-reveal).
I found the problem, you must put this command in the terminal => npm config set legacy-peer-deps true

Unable to use PushToTalkButton of Speechly in react app

I am working with Speechly API in my react application. In that, I imported PushToTalkButton and PushToTalkButtonContainer from #speechly/react-ui and I have also configured from Speechly Playground it's working fine in Playground. Then I click on the button(PushToTalkButton) in react application it is not capturing my voice and not using the microphone. I tried to find out the problem with ErrorPanel but nothing is showing.
Could you try upgrading to version 1.2.4 by issuing npm install #speechly/react-ui#latest
Earlier versions were inadvertently coupled with a certain version of react-client package and might cause a problem you described.

How does a React project resolve React dependencies?

Usually when I try a React package from GitHub, I never bother checking the React version that the packages is using. I'm curious now; does it actually matter? Will there be any conflict between dependencies?
Let's say there is a React package, packageA, that is using React v16.8 while my React project is still using version15. It's a huge leap. Will there be an issue whereby packageA is using some advance feature which is not supported by my project? Or will this simply not happen because everything is handled nicely by BabelJS?

Resources