aurelia / aurelia/templating

Route pointing to @noView with React component returns TypeError

Open
#550 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
113
Forks
101
PR merge metrics
No merged PRs in 30d

Description

**I'm submitting a bug report**

I've written an app that contains React components. However the Aurelia Router doesn't like pages that have `@noView`, returning TypeError.
#415 touched on this but there doesn't seem to be a resolution on it. getViewStrategy is mentioned but it's not clear whether it plays nice with Aurelia's router.

The flow looks like:
```
.------------------. .---------------.
| Landing Page: | --> | React | --> ....
| Aurelia template | | Component |
`------------------' `---------------'
```

* **Library Version:**
Aurelia 1.1.2

**Please tell us about your environment:**
* **Operating System:**
Windows 7

* **Node Version:**
6.2.0

* **NPM Version:**
3.8.9

* **JSPM OR Webpack AND Version**
Webpack 2.4.1

* **Browser:**
Chrome

* **Language:**
ES6

**Current behavior:**
Route with `@noView` results in TypeError.

**Expected/desired behavior:**

* **What is the expected behavior?**
Render a React component without errors.

* **What is the motivation / use case for changing the behavior?**
The ability to leverage modules from React and other libraries is very powerful.

Contributor guide

Open the contributing guide

Research direction

Reproduce the route flow using an Aurelia template, a React component, and @noView under the reported environment. Start by examining getViewStrategy and the discussion in issue #415; done means the router renders the React component without a TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react, webpack
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.