Giter Site home page Giter Site logo

reactjs / react.net Goto Github PK

View Code? Open in Web Editor NEW
2.3K 121.0 948.0 15.74 MB

.NET library for JSX compilation and server-side rendering of React components

Home Page: https://reactjs.net/

License: MIT License

CSS 0.32% HTML 2.16% Ruby 0.35% C# 88.24% PowerShell 0.31% JavaScript 4.10% Pascal 0.16% Batchfile 0.15% Shell 0.01% TypeScript 0.48% SCSS 3.68% ASP.NET 0.03%

react.net's Introduction

ReactJS.NET is a library that makes it easier to use Babel along with Facebook's React and JSX from C#.

.NET Core Desktop NuGet version Download count

Features

Quick Start

dotnet new -i React.Template
dotnet new reactnet-vanilla
dotnet run

Planning on using require or import module syntax in your application? Use the reactnet-webpack template instead for webpack support.

See also:

Building Manually and Contributing

When building your own copy of ReactJS.NET (for example, if implementing a new feature or fixing a bug), your first build always needs to be done using the build script (dev-build.bat) as this generates a few files required by the build (such as SharedAssemblyVersionInfo.cs). Once this build is completed, you can open React.sln in Visual Studio and compile directly from Visual Studio. Please refer to the documentation page on contributing for more information on contributing to ReactJS.NET.

Note that the build requires you to have Git installed. If you do not want to install Git, you may remove the GitVersion task from build.proj.

react.net's People

Contributors

alxandr avatar andersea avatar awayken avatar bartadv avatar coka avatar cseas avatar daniel15 avatar daniilsokolyuk avatar dependabot[bot] avatar dustinsoftware avatar gunnim avatar halstatt avatar mandrek44 avatar radnor avatar rarkins avatar renovate-bot avatar renovate[bot] avatar rickbeerendonk avatar rmjohnson avatar rosdi avatar samppis avatar saranshkataria avatar shikigami avatar smithrobs avatar soondead avatar taritsyn avatar teimaj avatar vanillajonathan avatar xabikos avatar zpao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react.net's Issues

React.NET with self hosting and PerRequestSingletons

Hi there, first of all thanks for the great library. It's useful to have familiar tooling when learning new things.

I'm running React.NET inside a Microsoft.Owin self hosted environment. I've picked out the parts I needed from existing sources and seemed to get an environment up and running reasonably painlessly, including using RazorEngine and server-side rendering.

My only issue is how can I inject the current request context into the IoC container correctly? In the React.Web example you've created a HttpContextLifetimeProvider which is speaking directly to the Asp.Net static HttpContext property. In Owin we have no such thing and instead must pass our context from inside the request pipeline.

Because the current strategy of creating PerRequest object instances relies on creating the instance creation Func on application startup, you never get an opportunity to create an instance of the LifeTimeProvider with a specific context. It seems quite engrained in the IoC implementation too not to be able to handle this.

Are there any plans to handle this and do you have any suggestions for what I can do in the meantime?

Cheers

Edit: Example of a potential Owin LifetimeProvider based on the original HttpContextLifeTimeProvider with context injected constructor: https://gist.github.com/shaunol/11238848

Add a good example

Think of something small but awesome to stick in React.Samples.Mvc4. I'm thinking something like the comments system example in the React tutorial. Render the first page of comments server-side, and have an infinite scroll or "load more" link that loads them via AJAX.

Maybe rewrite http://dan.cx/socialfeed.htm using React.

ClearScriptV8-64.dll

I recently switched to ClearScriptV8 and am now having build problems with my TFS build server. I am getting an error that ClearScriptV8-64.dll is being used by another process, and therefore the build can't copy the file. This didn't happen with the IE engine. Killing the worker process and then starting a build solves the problem.

Is there some part of the v8 engine that isn't getting release or shut down properly?

Server-side render pops up warning about deprecated usage.

Hi,

The server-side render is good, while it still render the old style initialization usage, like this:

React.render(
  HelloWorld({"name":"Daniel"}),  // <----------- HelloWorld is a component
  document.getElementById("react1")
);

But, this has been deprecated, as mentioned in this post. The better way could be:

React.render(
  React.createElement('HelloWorld', {"name":"Daniel"}, null),  // <---------- new style
  document.getElementById('react1')
);

Please update to use the factory pattern to initialize component.

Question about seeding initial data for server side rendering

First off, thanks for the great library! This has been a great help in getting our .net MVC site working with React. Now on to my question..

We are working on bringing over our site into React. We have wired up server side rendering, which is working great. One thing we've come across now though, is looking at how to pass some "global" data into the server side rendering context, without it being passed in through every single component. This data is in fact used by many components, through use of React's "mixin" functionality.

In other words, I can see how we can make data available to the server side render by passing in data through Html.React, or Html.ReactWithInit (thanks for this new method btw, we've enjoyed using it in a partial already), and we started going down the path of having a base model which is extended by the model used for any given view, and passing our data through there. This however will start to get ugly as we start to render multiple components to a page, duplicating the information we are storing in the base model.

After digging around in the source a little bit, it seems like one possible approach would be to find some means to make a call to ReactEnvironment.Execute(string code), and pass in a string from a Razor view that would let us pass in some JSON, etc, to seed our data into some kind of global variable.

Another alternative could be to create some sort of 'invisible' 'global-state-seeding' component which we could pass our data in through, however this would require our developers are all very aware of making sure this component is present in all pages, and only once.. which sounds less attractive than finding some means to have this data automatically wired up.

Do you have any suggestions on this? Are these feasible approaches, and if not, could you offer some insight on any alternatives?

Thanks!

Source map request return 500 when using MsieJavaScriptEngine

After long time investigation, the following statement returns different output in IE10 and IE11:

JSXTransformer.transform("var a = <span className=\"fuck\"/>", {sourceMap:true})

In IE11, which looks fine (notices that sourceMap object is generated):

{code: "var a = Rea...", extra: Object {...}, sourceMap: Object {...}, sourceMapFilename: "source.js"}

In IE10, suck... the sourceMap gone :(

{code: "var a = Rea...", extra: Object {...}}

When using MSIE JavaScript switcher in Json.Net, it is running in ChakraActiveScript mode, its document says ChakraJsRt mode leverage IE11. While I try with this way, but it does not work, still in ChakraActiveScript mode.

Any idea on this?


Besides, I think when send transformed JSX, it should check if it can generate source map before set the JSX header.

Reuse/pooling of JS engines

Some JS engines (like Jint) can be reused across multiple requests. We can speed up execution by pooling these engines and reusing them (similar to a thread pool).

Maybe dispose the engine and start from scratch if any files change?

Important: IE engine can't be pooled, it can only be used from a single thread.

Remove @jsx requirement for JSXTransformer

React 0.12 removed the requirement to have @jsx React.DOM at the top of JSX files, and instead always transforms them. Need to remove this from ReactJS.NET too, and update the tutorial.

Performance issues with server-side rendering

Split from #13



@justengland:
I have been noticing major performance problems with react.net, our Time To First Byte is nearly 1 second. Unless we can figure it out, we will not be able to run react.net in production.


@Daniel15:
What is your environment (OS, .NET version)?
Are you using server-side rendering? Is the performance improved if you disable server-side rendering?


@justengland:
I am just running a local environment, using IIS on Windows 8, .net 4.5. We are using both client and server side rendering. The Server Side rendering is what is slow, our data source is too large to pre-cache the templates so I would like to render them as they are requested.

With standard razor templating we are about 300ms, but with reactjs.net it is more like 1000ms. I am hoping we can solve the performance issue, I love react!

Compiling all .js files with JSX using Cassette

Hello! Thank you for React.NET. This is a great library to handle React Elements easily.

I need to find a way to compile all *.js files with JSX transformer (not only "*.jsx"). I found that there is a hard-coded file extension string inside JsxBundleProcessor.cs file:

if (asset.Path.EndsWith(".jsx", StringComparison.InvariantCultureIgnoreCase))

Is there any way to override this extension so Cassette compiles all "*.js" files? React JSX transformer provides some ES6 features that are useful in general so I think it should be configurable.

Object doesn't support property or method 'map'

I am trying out Reactjs.Net and i am running into an error. I have chosen to forgo using jsx in favor of plain JS. i am not sure if this is the cause of my problem, but i am following the compiled js examples i have found in the reactjs tutorials. array.map.js is the code found here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map. Do i have to use jsx?

the specific error
Error while rendering "BreadCrumbBox" to "react1": Object doesn't support property or method 'map'
Line: 8
Column:9

// SimpleReactor.js
var BreadCrumbBox = React.createClass({
    render: function () {
        var crumblets = this.props.crumbs.map(function (item, index) {
            return BreadCrumb({
                crumb: item,
                key: index
            });
        });
        return React.DOM.ul({}, crumblets);
    }
});


var BreadCrumb = React.createClass({
    render: function () {
        return React.DOM.ul({},
        React.DOM.a({
            href: this.props.crumb.Url.toString()
        }, this.props.crumb.Text));
    }
});

BreadCrumbBox = React.createFactory(BreadCrumbBox);
BreadCrumb = React.createFactory(BreadCrumb);

the above is my react script.

here is my react config

ReactSiteConfiguration.Configuration
            .AddScript("~/Scripts/array.map.js")
            .AddScript("~/Scripts/SimpleReactor.js");

here is my cshtml page

@using System
@using System.Web.Mvc
@using System.Web.Mvc.Ajax
@using System.Web.Mvc.Html
@using System.Web.Optimization
@using System.Linq
@using React
@using React.Web
@using React.Web.Mvc

@inherits System.Web.Mvc.WebViewPage<BreadCrumbModel>


@Html.React("BreadCrumbBox", new { crumbs = Model.Crumbs })

@section scripts{
    @Scripts.Render("~/Scripts/array.map.js")
    <script src="http://fb.me/react-0.12.0.js"></script>
    @Scripts.Render("~/Scripts/SimplerReactor.js")
    @Html.ReactInitJavaScript()
}

Add support for CommonJS modules

I agree that this would be really nice to have.
Need to think about how it will work with minification/combination though. Do Cassette or ASP.NET Bundling/Minification have first-class support for modules?
Need to try out different loaders and see how they play with each other.

cc @prabirshrestha

ES6 arrow function returning object literal error

Trying out the ES6 arrow functions and this works as expected
_ => "f";
//becomes
function(_) {return "f";};

but this transform fails to remove the right paren

_ => ({});
//becomes
function(_) {return {};});

Is this a bug, or am I misunderstanding something?

MSBuild task fails in .vbproj

Create two identical class library projects, one .csproj, one .vbproj and add the TransformJsx task. The .csproj will build, but the .vbproj will fail with the following:

Error   13  The "TransformJsx" task failed unexpectedly.
React.TinyIoC.TinyIoCResolutionException: Unable to resolve type: React.ReactEnvironment ---> React.TinyIoC.TinyIoCResolutionException: Unable to resolve type: React.ICache
   at React.TinyIoC.TinyIoCContainer.ResolveInternal(TypeRegistration registration, NamedParameterOverloads parameters, ResolveOptions options)
   at React.TinyIoC.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, ResolveOptions options)
   --- End of inner exception stack trace ---
   at React.TinyIoC.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, ResolveOptions options)
   at React.TinyIoC.TinyIoCContainer.SingletonFactory.GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options)
   at React.TinyIoC.TinyIoCContainer.ResolveInternal(TypeRegistration registration, NamedParameterOverloads parameters, ResolveOptions options)
   at React.TinyIoC.TinyIoCContainer.Resolve(Type resolveType)
   at React.TinyIoC.TinyIoCContainer.Resolve[ResolveType]()
   at React.MSBuild.TransformJsx.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() C:\Users\Jason\Projects\Podtrac\Source\users\jdefontes\scratch\MergedVb2\MergedVb2.vbproj   142 9   MergedVb2

VS 2012, .NET 4.5.

Using Cassette with AddPerSubDirectory in debug mode results in DirectoryNotFound exception

Environment (emphasis mine): Version Information: (Mono) 3.10.0 (tarball Wed Nov 5 12:50:04 UTC 2014); ASP.NET Version: 4.0.30319.17020 (XSP)

Steps to Reproduce:

  1. Call AddPerSubDirectory on the directory containing the jsx files. In this specific case, it was just Scripts.
  2. Set debug="true" in either the <cassette /> tag or the <compilation /> tag, i.e <compilation defaultLanguage="C#" debug="true"> ... </compilation>.
  3. Reference the scripts folder(s) in the view and run the project
  4. Upon inspection of the files that the browser tried to retrieve, a 500 error is returned for the JSX files, such as: System.IO.DirectoryNotFoundException Could not find a part of the path "/home/david/workspaces/perfect_cookie/project_perfect_cookie/project_perfect_cookie/cassette.axd/asset/Scripts/tutorial.jsx".

Additional information:

  • Standard JS files are returned fine, in their unminified form

Readonly ReactSiteConfiguration

The ReactSiteConfiguration static Configuration property is set to readonly.
The nuget package adds the following line to the ReactConfigur file

ReactSiteConfiguration.Configuration = new ReactSiteConfiguration();

I commented out that above line of code and everything seems to be working.

This is the actual error when compiling in VS.
Error 67 Property or indexer 'React.ReactSiteConfiguration.Configuration' cannot be assigned to -- it is read only

Please do not pollute my DOM

Really like the server-side rendering but got one problem with it. Is it possible to not include the extra "react1" container div since it messes with the CSS. Would be great if there was an additional optional parameter on the helper like this:

@Html.React("HelloWorld", new {name = "Daniel"}, "my-own-container")

If the optional parameter is specified no "react1" div is rendered and the optional is used when doing:

document.getElementById("my-own-container")

TinyIoCContainer Can't replace classes registered as AsPerRequestSingleton() in ReactConfig

There are really two issues:

1.) The following code in ReactConfig.cs will throw an exception on GetObject():

var container = AssemblyRegistration.Container;
container.Register<IReactEnvironment, ReactEnvironment>()
    .AsPerRequestSingleton();

This can be run only in places where HttpContext.Current is defined, because re-registering a class with AsPerRequestSingleton checks the items in the current HttpContext (I believe to remove it). This could be fixed with an if (null != HttpContext.Current) { /* do things */ }

2.) Even when registering a new ReactEnvironment successfully getting JSX files appears to break. A bare minimum test case I have is this: Follow ReactJS.Net tutorial and have a solution with that set up:

Create a new class:

using React;

namespace ReactDotNetExample
{
    public class CustomReactEnvironment : ReactEnvironment
    {
        public CustomReactEnvironment(
            IJavaScriptEngineFactory engineFactory,
            IReactSiteConfiguration config,
            ICache cache,
            IFileSystem fileSystem,
            IFileCacheHash fileCacheHash
        ) : base(engineFactory, config, cache, fileSystem, fileCacheHash)
        { }
    }
}

Add the following to the HomeController static constructor (HttpContext.Current will be defined here):

var container = AssemblyRegistration.Container;
container.Register<IReactEnvironment, CustomReactEnvironment>()
    .AsPerRequestSingleton();

Grabbing .jsx files will now fail even though CustomReactEnvironment and ReactEnvironment are functionally identical (500 error in browser). Adding the following line:

var container = AssemblyRegistration.Container;
container.Register<IReactEnvironment, CustomReactEnvironment>()
    .AsPerRequestSingleton();
container.Register<IReactEnvironment, ReactEnvironment>()
    .AsPerRequestSingleton();

Works, so the problem is somehow the CustomReactEnvironment class.

For what it's worth, I was trying to see if not disposing/deleting JS Engines per request would speed up server side rendering time, but I couldn't get it to work with a custom environment at all.

Insert localization string on the fly

.NET has quite powerful support for string localization via resources and automatic string insertion depending on the currently selected localization resource.

I'm wondering if it's possible to take advantage of this mechanism in reactjs.net to make text in components localizable and easy to translate?

ServiceStack Basic Authentication Failure

I'm trying to utilize the basic authentication of ServiceStack but even after passing the correct credentials, I'm getting the error:
[Authenticate: 6/16/2014 4:00:22 AM]: [REQUEST: {UserName:john,Password:test}]
ServiceStack.HttpError: Invalid BasicAuth credentials at
ServiceStack.Auth.BasicAuthProvider.Authenticate(IServiceBase authService, IAuthSession
session, Authenticate request) at
ServiceStack.Auth.AuthenticateService.Authenticate(Authenticate request, String provider,
IAuthSession session, IAuthProvider oAuthConfig) at
ServiceStack.Auth.AuthenticateService.Post(Authenticate request) at
ServiceStack.Auth.AuthenticateService.Get(Authenticate request) at lambda_method(Closure ,
Object , Object ) at ServiceStack.Host.ServiceRunner`1.Execute(IRequest request, Object
instance, TRequest requestDto)

The lines of code in my AppHost.cs class Configure function is as follows:

// Register AuthFeature with custom user session and Basic auth provider
Plugins.Add(new AuthFeature(
() => new AuthUserSession(),
new AuthProvider[] { new BasicAuthProvider() }
));

Plugins.Add(new RegistrationFeature());

// register storage for user sessions
container.Register(new MemoryCacheClient());
container.Register(c => new SessionFactory(c.Resolve()));

var userRep = new InMemoryAuthRepository();
container.Register(userRep);

//Add a user for testing purposes
string hash;
string salt;
new SaltedHash().GetHashAndSaltString("test", out hash, out salt);
userRep.CreateUserAuth(new UserAuth
{
Id = 1,
DisplayName = "DisplayName",
Email = "[email protected]",
UserName = "john",
FirstName = "FirstName",
LastName = "LastName",
PasswordHash = hash,
Salt = salt,
}, "test");

And the URL that I'm utilizing for authentication is:
http://:63743/auth?Username=john&Password=test

Please let me know what can be the root cause of this behavior?

Owin support/documentation?

Coming from a node.js world but would love to use ReactJS with Nancy and an Owin container. Are there any gotchas I should be concerned with? This might be related to the vNext support issue.

Server-side with IIFE

If your .js is using the IIFE style ReactJS fail to load the component on the server depending on how the component is scoped

example using var or window fail

(function (){
var DivBox = React.createElement('div', null, 'Just a div')
}())

this will fail

but
(function (){
DivBox = React.createElement('div', null, 'Just a div')
}())
without var or window will work.
why this behavior ?

500 Server Error on Azure

I've been prototyping with React for a month or so, and I have a standalone MVC4 project using ReactJS.NET, and everything seems to work just fine. Now, I went to bring ReactJS.NET into an existing project and as soon as I install it via nuget, I get a 500 Server Error. The project is an Azure project with a Worker Role and Storage. Is there anything I need to add to my Azure configuration beyond the web.config in the MVC project? If I revert the changes, the app will run fine, so it's something in the installation of ReactJS.NET that is borking. Any feedback would be great!

Support source maps

Files transformed to JSX on-the-fly should also output the associated source map

  • Does JSX transformation even support source maps at the moment?
  • May need to cache on disk in addition to in-memory? See if ASP.NET output caching with file dependency is sufficient.

Allow control of the container ID

Hi - I need to be able to control the value of the ID that is currently being generated as "react#" - I thought you may have fixed this as part of #45 but instead that change allows the user to define the element type. Any chance you could include the ability to change the id? I think others would be happy to have this ability as well.

Your code is setup well to allow for this change easily, something like so is all I need:

Addition on the Extension:

public static IHtmlString React(
this HtmlHelper htmlHelper,
string componentName,
T props,
string htmlTag = null,
string htmlId = null
)
{
var reactComponent = Environment.CreateComponent(componentName, htmlId, props);
if (!string.IsNullOrEmpty(htmlTag))
{
reactComponent.ContainerTag = htmlTag;
}
var result = reactComponent.RenderHtml();
return new HtmlString(result);
}

Addition on ReactEnvironment:

public virtual IReactComponent CreateComponent(string componentName, string componentDomId, T props)
{
EnsureUserScriptsLoaded();

if (string.IsNullOrEmpty(componentDomId))
{
_maxContainerId++;
componentDomId = string.Format(CONTAINER_ELEMENT_NAME, _maxContainerId);
}

var component = new ReactComponent(this, _config, componentName, componentDomId)
{
Props = props
};
_components.Add(component);
return component;
}

Thanks!

Visual Studio tooling

Some sort of Visual Studio tooling for JSX where the standard JavaScript navigation and refactoring tools still work. This is a long time ambitious task. I have no experience with creating tooling for Visual Studio. Assistance would be fantastic!

Alternatively, some ReSharper tooling could be made instead, if it's easier. This would give syntax highlighting and ReSharper's tooling at least. See ForTea, which is a plugin for ReSharper to implement support for T4 templates. T4 is very similar in that it's a new syntax with existing syntax embedded in it. T4 is a custom syntax with embedded C# code, JSX could be seen as a custom syntax with embedded JavaScript.

AddScript("~/Script/*.*")

It would be nice if I could add scripts like this :

ReactSiteConfiguration.Configuration.AddScript("~/scripts/*.*");

Thanks in advance :)

Implicitly add "/** @jsx React.DOM */" when using JSXBundle

When using JSXBundle, the bundle content should always be automatically prefixed with /** @jsx React.DOM */. At the moment, the JSX transformer will only actually run if the very first file in the bundle contains the @jsx annotation.

edit: my mistake

edit: nevermind!.. can't see a way to delete this myself, perhaps mod can

Access Violation Exception when running JSX handler in Visual Studio debugging session

Please note that this is not a consistently reproducible issue AFAICT.

Occasionally, and this seems to be about on average once an hour or so during active development, when going through this process (my normal react.js dev workflow) it results in a catastrophic Access Violation Exception:

  1. Start the Visual Studio 2013 debugger for my ASP.NET MVC project that uses React.NET.
  2. Make some changes to my JSX file in Sublime. Hit Save.
  3. Go over to Chrome, hit refresh. This requests the JSX file from the React.NET JSX handler again.
  4. If successful, the JSX handler will return the compiled JS, then I'll test it and probably go back to step 2 again, keeping the same debugger session active. But occasionally here I'll get Visual Studio popping up saying that the "Unknown Handler" had an Access Violation Exception. After clicking OK, the process crashes, and Visual Studio stops debugging.
  5. After a crash like this, without modifying the JSX file, I'll re-start the debugging session in VS, call the .jsx URL again executing the handler, and it will compile the JS just fine (meaning there's nothing wrong with the JSX itself).

Due to the obscure nature of the exception, that it says "Unknown Handler", and that I have no call stack or target site, I can't give any further information about the exception itself. I assume it is occurring in the MSIE integration layer, but that is just a guess. I also have yet to deploy this app to any kind of production environment, so this is at least a developer environment / IIS Express issue. I can not confirm if this does or does not happen using full IIS.

While I can't do anything explicitly to reproduce this, I can say that this happens at least under this criteria:

  • Keeping the Visual Studio debugging session active across multiple JSX file changes
  • This exception has not yet occurred on the first load -- it has always been after I've saved the JSX file a couple times and reloaded the page/called the JSX handler again a few times.
  • If it matters, I am not editing the file in Visual Studio (using Sublime 3)

And, if it's relevant (due to the MSIE engine), here's my system info:

  • Windows 8.1 update
  • IE 11.0.9600.17126

If you would like me to try anything explicitly on my machine to try to reproduce this issue, let me know and I'd be happy to help. Also, I'm interested to know if anyone else has encountered this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.