I would have to change how I thought about the relationship between the router and the layout components if I was going to be successful. My mental model for using React Router 3 wasn’t migrating well to v4. The struggle was not with the API, but more so the patterns and strategy for using it. Admittedly, it was a struggle the first day. But just as JSX itself overcame its critics (at least most of them), many came around to believe that a nested JSX router was a pretty cool idea. However, the use of nested JSX routes wasn’t accepted by everyone. In some ways, earlier versions of React Router resembled our traditional mental model of what an application router “should be” by placing all the routes rules in one place. It reminded me of the push-back the first version of React Router had for its progressive concepts. Considering community cohesiveness and being that React Router plays a huge role in so many React applications, I didn’t know how the community would accept the changes.Ī few months later, React Router 4 was released, and I could tell just from the Twitter buzz there was mixed feelings on the drastic re-write. The idea of these changes gave me anxiety. Since the router is such a big part of an application’s architecture, this would potentially change some patterns I’ve grown to love. “Let me show you our ideas React Router 4, it’s way different!” Truthfully, I didn’t understand the new direction and why it needed such big changes. It was exciting to meet someone who built a tool I liked so much, but I was shocked when he said. Michael is one of the principal authors of React Router along with Ryan Florence. I met Michael Jackson for the first time at React Rally 2016, soon after writing an article on React Router 3.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |