Refers to the react-templates library/syntax. Do not use for questions about JSX.
Questions tagged [react-templates]
14 questions
8
votes
3 answers
What's the best way to create a page template in React?
Basically I want to include a header, sidebar and footer to each page.
I've currently got the above mentioned on each individual page with react router clicking through to each of them.
I want to down size my code and have one main template that…

Sadie
- 95
- 1
- 1
- 6
6
votes
3 answers
Failed to parse source map from 'C:\Users\syrine\management\node_modules\stylis-plugin-rtl\src\stylis-rtl.ts'
I'm trying to add a react material template to my reactJs Project. I fix all the errors but I can't fix this one
WARNING in ./node_modules/stylis-plugin-rtl/dist/stylis-rtl.js
Module Warning (from…

Syrine Ben Hassen
- 61
- 1
- 6
3
votes
2 answers
How to output content of a nested object using map in React?
I have a json that looks like below
const assessmentData = [
{
"Sit1": [
{
"rule": "Rule1",
"type": "High"
}
]
},
{
"Sit2": [
{
…

Souvik Ray
- 2,899
- 5
- 38
- 70
3
votes
1 answer
Harmony between react-templates, TypeScript, and webpack
I am trying to get TypeScript, react-templates, and webpack to play together.
I started from the sample code at https://www.typescriptlang.org/docs/handbook/react-&-webpack.html. The webpack.config.js file contains
module.exports = {
entry:…

Ralph
- 31,584
- 38
- 145
- 282
1
vote
2 answers
How to simplify the conditions in template to avoid multiple repetitions
I have a scenario like showing text as well adding class togathered. it look like i require to add multiple times with same elements nearly. what would be the correct approach for this kind of scenarios?
here is my template:

3gwebtrain
- 14,640
- 25
- 121
- 247
1
vote
0 answers
Loading external templates in react-templates during runtime?
How is it possible to load external templates from the server during runtime with react-templates (or other reacte template system)?
I can't find any doc's about it but noticed that some people mentioned it as answer in SO questions.
Or should I…

edbras
- 4,145
- 9
- 41
- 78
0
votes
0 answers
How to create a coustem react native template
I want to create a custom react native template I am using this link as a reference I have created a template and pushed the code to git but when I try to create a react native app with the template I am getting the error

Ambady Ajay
- 175
- 1
- 10
0
votes
2 answers
Trouble passing React prop to DOM element
I'm trying to restrict an input to integers. I'm trying to pass the step attribute which seems to work when used directly in HTML, but am having a hard time getting having it passed from react. Below is my render method, and the numeric input is…

RagePwn
- 411
- 2
- 8
- 22
0
votes
0 answers
WebStorm, How can I edit templates in react-templates?
I use WebStorm and I have this plugin: https://github.com/idok/react-templates-plugin
Having it installed in my WebStorm I can type for example rcls and immediately have:
import React, {
Component,
PropTypes,
} from 'react';
class…

Red Day
- 1
- 2
0
votes
1 answer
Config browserify for react templates
I have a problem when building the bundle.js file with Browserify and Babel.
Header.js:
import HeaderRT from './Header.rt';
Header.rt:
Header>
Error:
Browserify Error
.../Header.rt:1
Header
^
ParseError: Unexpected token
As…
Trong Lam Phan
- 2,292
- 3
- 24
- 51
0
votes
1 answer
how to do i18n while using react-templates
react-templates is a good solution to separate template and logic code,however,if i have multiply templates but referrer to one logic code,like i18n requests.
eg.
post.js //which is the logic code
post.en.rt //which is the template for…

Kent Wood
- 1,392
- 2
- 14
- 30
0
votes
1 answer
Babel Plugin pre-AST compiling?
Simple question, is it possible to write a Babel plugin that receives raw file contents and returns a compiled string to Babel before any of those contents are parsed by Babel to AST?
Background
I'm creating a polymorphic React application that…

Eric H.
- 6,894
- 8
- 43
- 62
0
votes
1 answer
Can I use mocha to unit test react-templates in my ecmascript-6 app?
I have replaced all my React jsx with react-templates in an ecmascript-6 app. I really love having the html templates in a dedicated .rt file instead of mingled in with the es6 code; jsx just seemed wrong.
I'm using webpack-dev-server in…

Tom McClure
- 6,699
- 1
- 21
- 21
0
votes
0 answers
Adding React Template to React js error
I am new working with ReactJs, i am using React Js with React-templates, i followed the basic guide in the proyect documentation but i get an error that i don't know how to solve
Codepen !
http://codepen.io/anon/pen/bVKEqj
I am using gulp,…

RollRodrig
- 25
- 9