Questions tagged [meteor-react]

207 questions
48
votes
9 answers

Check if property exists using React.js

I'm new to using react.js, and am trying to write a re-usable component that has an optional property passed to it. In the component, that optional property pulls data from a db using meteor, then I want to check if a property exists on the returned…
bgmaster
  • 2,313
  • 4
  • 28
  • 41
11
votes
6 answers

Meteor/React - How to wait for Meteor.user()

I'm struggling to figure out how to wait for the Meteor.user() subscription in a react component. I know the user is logged in because Meteor.userId() returns the _id, but trying to access the email address show Meteor.user() returns undefined. I…
Scott
  • 3,204
  • 3
  • 31
  • 41
8
votes
1 answer

What's exactly the purpose of Components, Layouts and Pages folders in a Meteor-React project?

I'm starting a new project with Meteor and I would like to use the --full architecture when creating the project: meteor create myApp --full However, I don't really understand the purpose and differences of some folders in imports/ui/…
Nenu
  • 2,637
  • 1
  • 18
  • 24
7
votes
1 answer

Restrict Access (Meteor + React Router + Roles)

I am trying to implement alanning Meteor-roles with react-router in my Meteor application. Everything is working fine except the fact I can't manage properly to restrict a route using alanning roles or Meteor.user() I tried with meteor-roles: I am…
NOaMTL
  • 193
  • 1
  • 4
  • 13
7
votes
3 answers

React find DOM node by refs set to variable?

I am dynamically creating multiple text inputs (with dynamically created refs) along side the text that I want updated with the input. I am trying to get the value of the input by setting the ref to a variable and finding the DOM node with…
Mark Anderson
  • 663
  • 1
  • 8
  • 14
6
votes
2 answers

Meteor typescript complaining about missing doctype in vscode

VSCode is complaining about missing DOCTYPE on the html files. Meteor build system automatically adds file types and having them causes build errors. How do I make vscode to ignore missing doctype on html files? Error I get for this. Doctype must…
Kimmo Hintikka
  • 13,472
  • 7
  • 34
  • 63
5
votes
1 answer

Show All Users in Meteor React Client

I am having some trouble getting all the registered users to display on the client side. std:accounts-ui package is included in .meteor/packages. autopublish package has been removed. The data for all users are published in Users.js as allUsers,…
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
5
votes
1 answer

How to access original props inside CreateContainer?

I have amazingly simple and terrible problem. Let's say, I have a React component (called List) wrapped by createContainer: class List extends Component { render() { return ( ... ); } } export default createContainer({ ... },…
Oner Ksor
  • 901
  • 6
  • 16
5
votes
1 answer

Meteor 1.3 + React: detect subscription failure?

I have a simple Meteor subscription, and I display a loading message while the data is being loaded. But I don't know how to display error message if subscription failed. export const MyAwesomeComponent = createContainer(() => { let sub =…
aedm
  • 5,596
  • 2
  • 32
  • 36
5
votes
0 answers

Meteor + React + ReactRouter File Uploads

I am currently developing an application using Meteor, ReactJS and React Router (for routing). I have a requirement where a user should be able to upload a zipped web site and the Meteor application needs to show this web site as a part of one of…
Isuru
  • 594
  • 1
  • 5
  • 19
4
votes
1 answer

Is it possible to pass data up to withTracker directly from it's lower order component?

I'm working in an existing codebase that uses the React, Meteor, and react-meteor-data combo. Everything has been going relatively fine up until I tried implementing a search feature using withTracker, React Select, and Meteor's subscription…
iPwnPancakes
  • 106
  • 9
4
votes
1 answer

Android: URL.createObjectURL does not work properly (Failed to load because no supported source was found.)

I am trying to play an audio file that has been stored in LocalForage of my Meteor Android App. LocalForage.getItem(track_id, (err, value)=>{ if(err) throw err; //the loaded value is an arraybuffer of an m4a file let blob = new…
Taxel
  • 3,859
  • 1
  • 18
  • 40
4
votes
2 answers

React - Why is input field still readonly (i.e. not editable) even though I've added onChange?

I know this question has been asked before, but I've tried all of solutions I could find, and after wasting days on this, I'm literally about cry. What am I doing wrong? The input field remains readonly and onChange won't fire despite my varied and…
caitbun
  • 81
  • 1
  • 5
4
votes
1 answer

How to control meteor data stream with react?

I am using react and meteor, I am having trouble getting data from the server at one time. The component is getting the data in a stream and the component's render function is being called multiple times. This is the code I am using to get the posts…
Camron_Godbout
  • 1,583
  • 1
  • 15
  • 22
3
votes
1 answer

Explicitly Stop Subscription

In my Meteor application I have a publication which may or may not publish a large set of documents. Typically, the publication publishes any number of documents up to a few hundred. However, these documents are added by the user and there is no…
qsi
  • 683
  • 1
  • 7
  • 16
1
2 3
13 14