Do I need to know React before using React Router?


#1

I’ve got experience with Elm and Ember but never used React. To start using React with Reason, is it advisable that I first do React tutorials?

My concern is that I want to jump straight into Reason and learning React is going to ruin my momentum.


#2

Hey, do you mean knowing React before ReasonReact ? Because once you learn React, you’re already know how to use ReactRouter >= 4.x


#3

I’ve never used React before. Guess I should first do some basic tutorials.


#4

React’s doc is a good place to start reactjs.org

But still, I’m not sure why do you ask this question here. Unless you’re interesting ReasonReact


#5

The ReasonReact documentation is prefaced with “The documentation assumes relative familiarity with ReactJS.” Therefore, It may be good to first get understanding of how the React library works. I agree with @thangngoc89, the React docs are a great place to start. The reactJS docs are really well written, and I would recommend going through that before hitting ReasonReact.


#6

Besides the general “How to use React” guides I think React Components, Elements, and Instances is fundamentally necessary to clarify what a React component actually is (or can be) - to the point that it may be worth re-reading once you’ve gained more React experience.

It’s all too easy to get waylaid by some preconceived notion of what a UI component should be (or even too strongly associating React elements with “markup elements” due to the nature of the JSX notation).


#7

I’m completely agree with this. When I learnt React, I had a hard time understanding what is the different between components, elements and instances. But also note that, in ReasonReact, there aren’t instances. There are only ReasonReact.reactElement and ReasonReact.reactClass


#8

Really? I haven’t consciously realized this but Instance Variables pretty much implies that the state record has replaced the component instance. I prefer this model - to me this.props and this.state initially conveyed a false sense of (instance) ownership over values that are actually managed from “outside” of the user code.


#9

I worked through the official ReactJS tutorial followed by Jared’s ReasonReact tutorial and feel more or less comfortable with both of them now.