Closed dphov closed 6 years ago
Hello @dphov ,
Yes, it has react helpers, see this thread, those features is not yet documented.
Let me know if it works for you.
Hello @dphov ,
Have you solved it?
Nope, think I'll need to rewrite some code because of 'react-composer'. I'll try to experiment with this.
@dphov let me know if you need to have any changes in flow-router-extra
to make it compatible with react-mounter
.
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.
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.
@dr-dimitru Thanks a lot for your fast response and sharing these insights. Highly appreciated!
I migrated two apps to ostrio:flow-router-extra that use react-mounter and have no problem so far.
@macrozone would you contribute to our docs (see #40)? I have no experience with React+Meteor, I bet community would appreciate it much.
@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/>,
});
},
});
@macrozone do you import mount
, MainLayout
, Register
from somewhere?
Shall we give minimal example for MainLayout
and Register
templates?
@dr-dimitru for MainLayout, refer to https://github.com/kadirahq/react-mounter
i'll update the example above
Closing with v3.5.1
release, docs are available here, thanks a lot to @macrozone
This fork is compatible with react-mounter? After testing your fork, my application doesn't run as expected.