Freecodecamp: Audit hardGoTo and unify if possible

Created on 3 Oct 2019  路  5Comments  路  Source: freeCodeCamp/freeCodeCamp

As pointed out in this comment and the ones below it. The hardGoTo code that is used in several places in the codebase is a "legacy thing that we had before we had navigate. It can be removed and cleaned up."

A search for "hardGoTo" reveals eight results. They can probably all be changed to use navigate and the redux file deleted.

api client

Most helpful comment

In a perfect world I should be able to proxy everything, but sadly that would need a lot of re-write.

I am keeping this open for traceability.

All 5 comments

Hello, can I help on this one?

go for it @dsuarezlogans

I re-audited this and realised that the hardGoTo is used for direct calls to the api endpoints without proxying through internally.

We should leave it be for now.

@raisedadead as it stands, some api calls go via hardGoTo and some via navigate. Is it worth leaving this open until we've decided which should be which? Or are you already happy that they're as they should be?

In a perfect world I should be able to proxy everything, but sadly that would need a lot of re-write.

I am keeping this open for traceability.

Was this page helpful?
0 / 5 - 0 ratings