Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which react version is being used by reactjs #1338

Open
AfshinZavvar opened this issue Jun 6, 2023 · 1 comment
Open

Which react version is being used by reactjs #1338

AfshinZavvar opened this issue Jun 6, 2023 · 1 comment

Comments

@AfshinZavvar
Copy link

AfshinZavvar commented Jun 6, 2023

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

@LorenDorez
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants