React.NET icon indicating copy to clipboard operation
React.NET copied to clipboard

Which react version is being used by reactjs

Open AfshinZavvar opened this issue 1 year ago • 1 comments

Sorry for asking. We've had issues using ReactJS on MVC .NET4.8 Getting strange errors like React Dom already delcared ,Cannot read properties of null (reading 'useState')], Please expose version of React

Still couldn't come up with a solution. Can you please help me to find the React version that ReactJS is using for .Net framweok 4.8?

Here is the config I use

         ReactSiteConfiguration.Configuration
                .SetAllowJavaScriptPrecompilation(false)
                .SetLoadReact(false)
                .SetLoadBabel(false)
                .AddScriptWithoutTransform("~/main-script.js");

            JsEngineSwitcher.Current.DefaultEngineName = V8JsEngine.EngineName;
            JsEngineSwitcher.Current.EngineFactories.AddV8();

We're using latest possible version on Nuget and on FE side we're using React and Vite

AfshinZavvar avatar Jun 06 '23 02:06 AfshinZavvar

Your not loading React. You have .SetLoadReact(false) which means you must provide your own version of react in your entry file.

But to answer the question ReactJS.net is bundled with version 16.13.1 as seen here

LorenDorez avatar Aug 09 '23 16:08 LorenDorez