gabrielbull / gabrielbull/react-router-server

fetchState not working if component uses contextTypes

Open
#27 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
427
Forks
17
PR merge metrics
No merged PRs in 30d

Description

I tried using `react-router-server` in a project that uses `react-intl`. In some components I need to use the intl context that is provided by `react-intl` but if I declare contextTypes for that component fetchState doesn't work.

I added console.log statements to the callback of my data fetch method and the callback of renderToString and it seems like the component just ignores that it should fetch data and renders immediately.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in a project using react-router-server with react-intl, focusing on a component that declares contextTypes. Compare the data-fetch callback with the renderToString callback and determine why rendering proceeds before fetching; done means fetchState works while the component consumes the intl context.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
backend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.