Skip to content

Case Sensitivity #76

Closed
Closed
@daelliott

Description

@daelliott

Not sure where this issue belongs and couldn't find a better place to request help.

I am new to React and have been playing with tutorials. I was working with this one http://www.syncano.com/getting-started-reactjs-tutorial/ and converted it using the ReactJS.NET framework.

I have it up and running but took some work to figure out what was going on. After getting everything in the right place and configured correctly, I loaded the screen and saw that it looked completely different than the reference tutorial. Upon looking at the rendered HTML I saw that the CSS class name was completely missing from the corresponding HTML tags. As I manually started adding it in via the developer tool, I saw that the screen slowly look better. Eventually I got to the root problem.

The issue turned out to be case sensitivity. The 2 big offenders were

  • classname should be className
  • onclick should be onClick

I am doing server side via the HTML helpers
@Html.React("App", new {} )
@Html.ReactInitJavaScript()

As a last item. "new {}" is required for @Html.React as null would blow up.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions