Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flow-router-extra and react-mounter #19

Closed
dphov opened this issue Aug 4, 2017 · 14 comments
Closed

flow-router-extra and react-mounter #19

dphov opened this issue Aug 4, 2017 · 14 comments

Comments

@dphov
Copy link

dphov commented Aug 4, 2017

This fork is compatible with react-mounter?
After testing your fork, my application doesn't run as expected.

@dr-dimitru
Copy link
Member

Hello @dphov ,

Yes, it has react helpers, see this thread, those features is not yet documented.

Let me know if it works for you.

@dr-dimitru
Copy link
Member

Hello @dphov ,

Have you solved it?

@dphov
Copy link
Author

dphov commented Aug 8, 2017

Nope, think I'll need to rewrite some code because of 'react-composer'. I'll try to experiment with this.

@dr-dimitru
Copy link
Member

@dphov let me know if you need to have any changes in flow-router-extra to make it compatible with react-mounter.

@derwaldgeist
Copy link

derwaldgeist commented Aug 21, 2017

If I see it correctly, this router is somewhat of a community-led successor of FlowRouter, right? What makes me a bit nervous is that it is so tightly coupled with Blaze. What was the reason to include the functionality of BlazeLayout and the other Blaze helpers? TBH, I preferred the "lean approach" the old FlowRouter had. Since this one is dead, I was considering your replacement, but then I stumbled upon the missing React compatibility.

Do you have any plans to include full React support? It would be awesome if the Router would support React and Blaze alike, since this is one of the major obstacles I found when upgrading an existing Blaze app gradually to React. It would be ubercool to be able to use this router in the transition phase and beyond.

@dr-dimitru
Copy link
Member

Hello @derwaldgeist ,

If I see it correctly, this router is somewhat of a community-led successor of FlowRouter, right?

We work hard to make this package better, and we glad community picked it up.

What makes me a bit nervous is that it is so tightly coupled with Blaze. What was the reason to include the functionality of BlazeLayout and the other Blaze helpers?

We made this package for our projects in a first place. In our development we don't use React, but very happy with Blaze.

I preferred the "lean approach" the old FlowRouter had. Since this one is dead, I was considering your replacement, but then I stumbled upon the missing React compatibility.

We are already thought to uncouple FlowRouter and Blaze/BlazeRenderer and wish to hear more community opinions on this.

Do you have any plans to include full React support?

Definitely - Yes. The problem is we don't use React, so we don't know its needs. We're happy to all requests like this one, where we implemented something similar to react-layout and react-mounter.

If you need us to add more helpers/methods to interact with React - tell us, but be specific.

Thank you for sharing your thoughts on this, it has big value for our Open Source projects.

@derwaldgeist
Copy link

@dr-dimitru Thanks a lot for your fast response and sharing these insights. Highly appreciated!

@dr-dimitru
Copy link
Member

@macrozone
Copy link

I migrated two apps to ostrio:flow-router-extra that use react-mounter and have no problem so far.

@dr-dimitru
Copy link
Member

dr-dimitru commented Jul 26, 2018

@macrozone would you contribute to our docs (see #40)?
I have no experience with React+Meteor, I bet community would appreciate it much.

@macrozone
Copy link

macrozone commented Jul 26, 2018

@dr-dimitru i didn't change anything from standard flowrouter. This still works:

import React from 'react'
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
import { mount } from 'react-mounter';
import AboutMe from './AboutMe'

const MainLayout = ({content}) => (
    <div>
      <header>
        This is our header
      </header>
      <main>
        {content()}
      </main>
    </div>
);

 FlowRouter.route('/about-me', {
    name: 'about-me',
    action() {
      mount(MainLayout, {
        content: () => <AboutMe/>,
      });
    },
  });

@dr-dimitru
Copy link
Member

@macrozone do you import mount, MainLayout, Register from somewhere?
Shall we give minimal example for MainLayout and Register templates?

@macrozone
Copy link

@dr-dimitru for MainLayout, refer to https://github.com/kadirahq/react-mounter

i'll update the example above

dr-dimitru added a commit that referenced this issue Jul 26, 2018
- 👨‍💻 Implement #52 , - pass options to `page.js` NPM module, see
[updated docs]() , thanks to @macrozone
- 📄 Add [docs for usage with
React.js](https://github.com/VeliovGroup/flow-router/blob/master/docs/re
act.md), closing #19 and #40 , thanks to @macrozone
- 📄 Added tutorial for
[auto-scroll](https://github.com/VeliovGroup/flow-router/blob/master/doc
s/auto-scroll.md), closing #9
- 📄 Added 2 new related packages:
  - 📦
[krishaamer:flow-router-breadcrumb](https://github.com/krishaamer/flow-r
outer-breadcrumb) - Easy way to add a breadcrumb with enough
flexibility to your project (`flow-router-extra` edition)
  - 📦
[nicolaslopezj:router-layer](https://github.com/krishaamer/body-class)
- Easily scope CSS by automatically adding the current template and
layout names as classes on the body element
- 📦 Update `qs` NPM lib to `v6.5.2`
- 👷‍♂️ Active-route and other helpers refactoring
- 🏗 Minor overall codebase enhancement & linting
- 📦 Internal Atmosphere dependencies update + compatibility with
`meteor@1.7.0.3`
@dr-dimitru
Copy link
Member

Closing with v3.5.1 release, docs are available here, thanks a lot to @macrozone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants