Git Product home page Git Product logo

Comments (6)

cemarguvanli avatar cemarguvanli commented on July 25, 2024 3

Okay, guys, I figure out the problem. browserHistory does not work on prod

import { browserHistory } from 'react-router';
const history = syncHistoryWithStore(browserHistory, store);

change with this:

import { hashHistory } from 'react-router';
const history = syncHistoryWithStore(hashHistory, store);

from webpack-react-redux.

Tushkiz avatar Tushkiz commented on July 25, 2024

Which node version?
Can you upgrade and try again.

from webpack-react-redux.

brenopolanski avatar brenopolanski commented on July 25, 2024

Well... my command build work fine, but when i'll run index.html it not render in browser.

screenshot from 2016-12-23 14-47-56

from webpack-react-redux.

cemarguvanli avatar cemarguvanli commented on July 25, 2024

Any suggest about this issue?

from webpack-react-redux.

brenopolanski avatar brenopolanski commented on July 25, 2024

hey @cemarguvanli

thanks for your solution, it work for me :)

from webpack-react-redux.

jpsierens avatar jpsierens commented on July 25, 2024

It should work with browserHistory if you run the dist folder on a server. From your screenshot I can see you are just navigating to it so it's not going to work that way (due to the routes).

hashHistory is not the preferred way to handle routes in production but it can do the trick when you are in dev mode and just want to check the output:

Hash history works without configuring your server, so if you're just getting started, go ahead and use it. In general, though, production web applications should use browserHistory for the cleaner URLs, and for support for server-side rendering, which is impossible with hashHistory.

check https://github.com/ReactTraining/react-router/blob/master/docs/guides/Histories.md#browserhistory for more info.

from webpack-react-redux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.